[FFmpeg-cvslog] dump_stream: print the timebase as is, do not reduce it
Anton Khirnov
git at videolan.org
Thu Jun 26 21:07:32 CEST 2014
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Jun 24 07:39:35 2014 +0200| [3f4edf012593c73941caa0ef9b292da00225c3df] | committer: Anton Khirnov
dump_stream: print the timebase as is, do not reduce it
It makes more sense to print the timebase exactly as it is set. Also,
this avoids a divide by zero when av_dump_format() is called on a format
context before writing the header.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f4edf012593c73941caa0ef9b292da00225c3df
---
libavformat/dump.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/dump.c b/libavformat/dump.c
index 1e385ab..aae23af 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -279,7 +279,6 @@ static void dump_stream_format(AVFormatContext *ic, int i,
char buf[256];
int flags = (is_output ? ic->oformat->flags : ic->iformat->flags);
AVStream *st = ic->streams[i];
- int g = av_gcd(st->time_base.num, st->time_base.den);
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
avcodec_string(buf, sizeof(buf), st->codec, is_output);
@@ -292,7 +291,7 @@ static void dump_stream_format(AVFormatContext *ic, int i,
if (lang)
av_log(NULL, AV_LOG_INFO, "(%s)", lang->value);
av_log(NULL, AV_LOG_DEBUG, ", %d, %d/%d", st->codec_info_nb_frames,
- st->time_base.num / g, st->time_base.den / g);
+ st->time_base.num, st->time_base.den);
av_log(NULL, AV_LOG_INFO, ": %s", buf);
if (st->sample_aspect_ratio.num && // default
More information about the ffmpeg-cvslog
mailing list