changeset 6466:3dae816c2485 libavcodec

do not display par and dar if not available
author bcoudurier
date Thu, 06 Mar 2008 23:09:16 +0000
parents 9375720f6ed1
children 8cb6b0f6f759
files utils.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Thu Mar 06 20:44:44 2008 +0000
+++ b/utils.c	Thu Mar 06 23:09:16 2008 +0000
@@ -1128,6 +1128,7 @@
             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 @@
                      " [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),