mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avcodec/dirac_parser: do not offset AV_NOPTS_OFFSET
Fixes: signed integer overflow: -9223372036854775807 - 48000 cannot be represented in type 'long long'
Fixes: 26521/clusterfuzz-testcase-minimized-ffmpeg_dem_DIRAC_fuzzer-5635536506847232
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 343c3149ab
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9ccca254df
commit
5e8bff6c24
@ -207,7 +207,7 @@ static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
int64_t pts = AV_RB32(cur_pu + 13);
|
||||
if (s->last_pts == 0 && s->last_dts == 0)
|
||||
s->dts = pts - 1;
|
||||
else
|
||||
else if (s->last_dts != AV_NOPTS_VALUE)
|
||||
s->dts = s->last_dts + 1;
|
||||
s->pts = pts;
|
||||
if (!avctx->has_b_frames && (cur_pu[4] & 0x03))
|
||||
|
Loading…
Reference in New Issue
Block a user