Mercurial > libavcodec.hg
comparison utils.c @ 6466:3dae816c2485 libavcodec
do not display par and dar if not available
| author | bcoudurier |
|---|---|
| date | Thu, 06 Mar 2008 23:09:16 +0000 |
| parents | 0c3cc1d7a0b3 |
| children | 8cb6b0f6f759 |
comparison
equal
deleted
inserted
replaced
| 6465:9375720f6ed1 | 6466:3dae816c2485 |
|---|---|
| 1126 } | 1126 } |
| 1127 if (enc->width) { | 1127 if (enc->width) { |
| 1128 snprintf(buf + strlen(buf), buf_size - strlen(buf), | 1128 snprintf(buf + strlen(buf), buf_size - strlen(buf), |
| 1129 ", %dx%d", | 1129 ", %dx%d", |
| 1130 enc->width, enc->height); | 1130 enc->width, enc->height); |
| 1131 if (enc->sample_aspect_ratio.num) { | |
| 1131 av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, | 1132 av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den, |
| 1132 enc->width*enc->sample_aspect_ratio.num, | 1133 enc->width*enc->sample_aspect_ratio.num, |
| 1133 enc->height*enc->sample_aspect_ratio.den, | 1134 enc->height*enc->sample_aspect_ratio.den, |
| 1134 1024*1024); | 1135 1024*1024); |
| 1135 snprintf(buf + strlen(buf), buf_size - strlen(buf), | 1136 snprintf(buf + strlen(buf), buf_size - strlen(buf), |
| 1136 " [PAR %d:%d DAR %d:%d]", | 1137 " [PAR %d:%d DAR %d:%d]", |
| 1137 enc->sample_aspect_ratio.num, enc->sample_aspect_ratio.den, | 1138 enc->sample_aspect_ratio.num, enc->sample_aspect_ratio.den, |
| 1138 display_aspect_ratio.num, display_aspect_ratio.den); | 1139 display_aspect_ratio.num, display_aspect_ratio.den); |
| 1140 } | |
| 1139 if(av_log_get_level() >= AV_LOG_DEBUG){ | 1141 if(av_log_get_level() >= AV_LOG_DEBUG){ |
| 1140 int g= ff_gcd(enc->time_base.num, enc->time_base.den); | 1142 int g= ff_gcd(enc->time_base.num, enc->time_base.den); |
| 1141 snprintf(buf + strlen(buf), buf_size - strlen(buf), | 1143 snprintf(buf + strlen(buf), buf_size - strlen(buf), |
| 1142 ", %d/%d", | 1144 ", %d/%d", |
| 1143 enc->time_base.num/g, enc->time_base.den/g); | 1145 enc->time_base.num/g, enc->time_base.den/g); |
