[FFmpeg-devel] [PATCH] ffprobe: report unavailable SAR correctly in stream info
Rostislav Pehlivanov
atomnuker at gmail.com
Sat Apr 14 23:20:46 EEST 2018
On 12 April 2018 at 09:07, Timo Teräs <timo.teras at iki.fi> wrote:
> av_guess_sample_aspect_ratio() will return undefined or missing
> value as {0,1}. This fixes show_stream() to check numerator to
> display 'N/A' when appropriate. show_frame() does this already
> correctly.
>
> Signed-off-by: Timo Teräs <timo.teras at iki.fi>
> ---
> fftools/ffprobe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index 82dfe4f58a..8b2a18b6b1 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -2521,7 +2521,7 @@ static int show_stream(WriterContext *w,
> AVFormatContext *fmt_ctx, int stream_id
> #endif
> print_int("has_b_frames", par->video_delay);
> sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL);
> - if (sar.den) {
> + if (sar.num) {
> print_q("sample_aspect_ratio", sar, ':');
> av_reduce(&dar.num, &dar.den,
> par->width * sar.num,
> --
> 2.17.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
LGTM
More information about the ffmpeg-devel
mailing list