diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-04-27 23:22:27 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-04-27 23:22:27 +0000 |
commit | 8280e2bd456bb296cbafc296b6c7814918d57435 (patch) | |
tree | f24b32d092ed51c54d696bcbd1c561b66732e9cd /ffprobe.c | |
parent | 6e25b78001a127a7c507ef6e55de9fe211d03716 (diff) | |
download | ffmpeg-8280e2bd456bb296cbafc296b6c7814918d57435.tar.gz |
Make ffprobe show sample_aspect_ratio and display_aspect_ratio only if
sample_aspect_ratio is known.
Avoid to show bogus values, which may confuse both the human and the
machine reader.
Based on a patch by Robert Krüger $(echo lsvfhfs@tjhobm7.ef | tr "b-za" "a-z").
Originally committed as revision 22983 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -155,6 +155,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) printf("width=%d\n", dec_ctx->width); printf("height=%d\n", dec_ctx->height); printf("has_b_frames=%d\n", dec_ctx->has_b_frames); + if (dec_ctx->sample_aspect_ratio.num) { printf("sample_aspect_ratio=%d:%d\n", dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den); av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, @@ -163,6 +164,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) 1024*1024); printf("display_aspect_ratio=%d:%d\n", display_aspect_ratio.num, display_aspect_ratio.den); + } printf("pix_fmt=%s\n", dec_ctx->pix_fmt != PIX_FMT_NONE ? av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); break; |