avformat/dhav: do not use zero fps

Fixes: assertion failure
Fixes: 38332/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-4522405595316224

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2021-09-17 21:28:00 +02:00
parent a3ca06f9ea
commit 71b4d16bca
1 changed files with 1 additions and 1 deletions

View File

@ -315,7 +315,7 @@ static int64_t get_pts(AVFormatContext *s, int stream_index)
if (diff < 0)
diff += 65535;
if (diff == 0)
if (diff == 0 && dhav->frame_rate)
diff = av_rescale(dhav->frame_number - dst->last_frame_number, 1000, dhav->frame_rate);
dst->pts += diff;
} else {