diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-17 18:51:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-24 18:35:07 +0100 |
commit | b75ac7c71cc89bd162b330ab95f5009ab6af46d8 (patch) | |
tree | 76733084b470e5ec6a9ba43caeebe9901400c5cb /libavcodec/utils.c | |
parent | c071b006436d663b977068f8d23cbc061f40491f (diff) | |
download | ffmpeg-b75ac7c71cc89bd162b330ab95f5009ab6af46d8.tar.gz |
lavc: include timebase in avcodec string at debug level.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index bbf8f529d9..0844b249ee 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2120,6 +2120,15 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) ", %s", av_get_sample_fmt_name(enc->sample_fmt)); } break; + case AVMEDIA_TYPE_DATA: + if (av_log_get_level() >= AV_LOG_DEBUG) { + int g = av_gcd(enc->time_base.num, enc->time_base.den); + if (g) + snprintf(buf + strlen(buf), buf_size - strlen(buf), + ", %d/%d", + enc->time_base.num / g, enc->time_base.den / g); + } + break; default: return; } |