mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-23 15:26:57 +00:00
avcodec/mpeg12dec: Fix got_output
This makes got_output consistent with the code in slice_end() which sets the output
in slice_end()
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
int ret = av_frame_ref(pict, s->current_picture_ptr->f);
...
} else {
Fixes: assertion failure
Fixes: 22178/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-5664234440753152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4f33a9803a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
53c685afde
commit
97c4d49538
@ -2471,7 +2471,7 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
|
||||
return ret;
|
||||
else if (ret) {
|
||||
// FIXME: merge with the stuff in mpeg_decode_slice
|
||||
if (s2->last_picture_ptr || s2->low_delay)
|
||||
if (s2->last_picture_ptr || s2->low_delay || s2->pict_type == AV_PICTURE_TYPE_B)
|
||||
*got_output = 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user