aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-29 23:23:25 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-07-08 09:56:09 +0200
commitf57e97dfd9539bc3f4f97a76ebc001f0b055cb88 (patch)
treecba55d8ae871a77805abf0666f6de926eb14bc54
parenta6229fcd405d4135848c83df73634871260de59c (diff)
downloadffmpeg-f57e97dfd9539bc3f4f97a76ebc001f0b055cb88.tar.gz
avformat/utils: Check timebase before use in estimate_timings()
Fixes: division by 0 Fixes: 15480/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5746727434321920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 886cd6fd83..180df782f0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2953,6 +2953,7 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
AVStream av_unused *st;
for (i = 0; i < ic->nb_streams; i++) {
st = ic->streams[i];
+ if (st->time_base.den)
av_log(ic, AV_LOG_TRACE, "stream %d: start_time: %0.3f duration: %0.3f\n", i,
(double) st->start_time * av_q2d(st->time_base),
(double) st->duration * av_q2d(st->time_base));