mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-12-24 11:52:06 +08:00
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
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user