diff options
author | Timo Teräs <timo.teras@iki.fi> | 2018-04-12 11:07:36 +0300 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-04-17 20:13:25 +0100 |
commit | de253343c151e0ba752f91088ab1aa87f50e1590 (patch) | |
tree | b672b7fa214a14dd404f92cf538a8eaf916e3de4 /fftools/ffprobe.c | |
parent | 9c787a21ce91349a97dd87b108839b1d13035cbd (diff) | |
download | ffmpeg-de253343c151e0ba752f91088ab1aa87f50e1590.tar.gz |
ffprobe: report unavailable SAR correctly in stream info
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@iki.fi>
(cherry picked from commit c663dce031b3973e37c83ae1818f1484e1cf482c)
Diffstat (limited to 'fftools/ffprobe.c')
-rw-r--r-- | fftools/ffprobe.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |