diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-17 21:28:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-19 20:12:32 +0200 |
commit | 71b4d16bca99b5feee33ea9f4eaf2dc6e96f1ed3 (patch) | |
tree | 82cc49b5dfc230688ca4d6a4887d88ec8262b4ac /libavformat | |
parent | a3ca06f9ea0d728273494185b68af20f5de3056b (diff) | |
download | ffmpeg-71b4d16bca99b5feee33ea9f4eaf2dc6e96f1ed3.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/dhav.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dhav.c b/libavformat/dhav.c index 5ae39a2a64..f67b0b89ac 100644 --- a/libavformat/dhav.c +++ b/libavformat/dhav.c @@ -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 { |