summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-09-18 14:45:17 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-09-18 14:45:17 +0000
commit21189011922a9d2dbff4ebba9d5bacc9d1215f99 (patch)
treedc98b8993a48c800bbd6df469f975de790cf0c46 /libavcodec
parent357a28430a11c4b547b12e07a00c1286bdb56b2a (diff)
print more time_base fps stuff if av_log level is at debug or above
print more likely correct fps not sure if this is formated optimally ... Originally committed as revision 4596 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 26c5645f0a..1cec213749 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1072,9 +1072,14 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
}
if (enc->width) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
- ", %dx%d, %0.2f fps",
- enc->width, enc->height,
- 1/av_q2d(enc->time_base));
+ ", %dx%d",
+ enc->width, enc->height);
+ 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),
+ ", %d/%d",
+ enc->time_base.num/g, enc->time_base.den/g);
+ }
}
if (encode) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),