diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-22 19:45:53 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-22 19:45:53 +0000 |
commit | 082491c47311619e4b6e1ab5dc0140a3d43769ac (patch) | |
tree | f0554a2eee6bc74981da054153126a66faab871f /libavformat/utils.c | |
parent | a308737bd66a1c669b9be71a1b834d8419fe70ca (diff) | |
download | ffmpeg-082491c47311619e4b6e1ab5dc0140a3d43769ac.tar.gz |
print stream sar if present and different than codec sar
Originally committed as revision 16720 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index b49fadcce2..5ce015bc5e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2766,6 +2766,17 @@ static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_out av_log(NULL, AV_LOG_INFO, "(%s)", st->language); av_log(NULL, AV_LOG_DEBUG, ", %d/%d", st->time_base.num/g, st->time_base.den/g); av_log(NULL, AV_LOG_INFO, ": %s", buf); + if (st->sample_aspect_ratio.num && // default + av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)) { + AVRational display_aspect_ratio; + av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, + st->codec->width*st->sample_aspect_ratio.num, + st->codec->height*st->sample_aspect_ratio.den, + 1024*1024); + av_log(NULL, AV_LOG_INFO, ", PAR %d:%d DAR %d:%d", + st->sample_aspect_ratio.num, st->sample_aspect_ratio.den, + display_aspect_ratio.num, display_aspect_ratio.den); + } if(st->codec->codec_type == CODEC_TYPE_VIDEO){ if(st->r_frame_rate.den && st->r_frame_rate.num) av_log(NULL, AV_LOG_INFO, ", %5.2f tb(r)", av_q2d(st->r_frame_rate)); |