aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-06 23:09:16 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-06 23:09:16 +0000
commit7ee4dd028253e67379fed95144152b408c01787d (patch)
tree5bbab56bc9e75f8c44c805f793c2a8a0b6f8f7c3 /libavcodec/utils.c
parentb10b849f357171c1ade53be279705ca9e6ce10fc (diff)
downloadffmpeg-7ee4dd028253e67379fed95144152b408c01787d.tar.gz
do not display par and dar if not available
Originally committed as revision 12355 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 6418776496..3215c6d876 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1128,6 +1128,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %dx%d",
enc->width, enc->height);
+ if (enc->sample_aspect_ratio.num) {
av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,
enc->width*enc->sample_aspect_ratio.num,
enc->height*enc->sample_aspect_ratio.den,
@@ -1136,6 +1137,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
" [PAR %d:%d DAR %d:%d]",
enc->sample_aspect_ratio.num, enc->sample_aspect_ratio.den,
display_aspect_ratio.num, display_aspect_ratio.den);
+ }
if(av_log_get_level() >= AV_LOG_DEBUG){
int g= ff_gcd(enc->time_base.num, enc->time_base.den);
snprintf(buf + strlen(buf), buf_size - strlen(buf),