[FFmpeg-devel] [PATCH 1/1] [RFC] ffprobe: report DAR even if SAR is undefined

Timo Teras timo.teras at iki.fi
Tue Apr 17 12:32:43 EEST 2018


On Tue, 17 Apr 2018 11:06:58 +0200
Michael Niedermayer <michael at niedermayer.cc> wrote:

> On Tue, Apr 17, 2018 at 08:32:57AM +0300, Timo Teras wrote:
> > See my earlier patch that changes it to report as "N/A". This is
> > what  
> 
> i meant the function. Which cannot output N/A as it outputs a
> "rational number" not a string.
> and for such numbers 0/0 closer represents undefined than 0/1 in a
> mathematical sense

I suppose so. But seems the established de facto standard is to use 0/1
for undefined. Seems that denominator 0 means error or invalid. And
numerator 0 with any denominator means unknown.

This is documented for av_image_check_sar(),
av_guess_sample_aspect_ratio(), AVCodecParameters.sample_aspect_ratio
and various other places. And whole lot of stuff works based on this.

Timo


More information about the ffmpeg-devel mailing list