Commit f57e97df authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a6229fcd
...@@ -2953,6 +2953,7 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) ...@@ -2953,6 +2953,7 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
AVStream av_unused *st; AVStream av_unused *st;
for (i = 0; i < ic->nb_streams; i++) { for (i = 0; i < ic->nb_streams; i++) {
st = ic->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, 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->start_time * av_q2d(st->time_base),
(double) st->duration * av_q2d(st->time_base)); (double) st->duration * av_q2d(st->time_base));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment