summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-05-28 00:19:56 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-03 12:10:24 +0200
commit4fdf23df7d2607be23445a044f68798e6448d2fa (patch)
tree4a122d94cdb832e22023f2b4fa6fde18aae6de27 /libavcodec/mpeg12dec.c
parenta621600f667524c8720a38012392512fbe274654 (diff)
downloadffmpeg-4fdf23df7d2607be23445a044f68798e6448d2fa.tar.gz
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 4f33a9803a3068ce2d52289fc1db60375dc8b7a5) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index b352023461..2af8b4e2c2 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2483,7 +2483,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;
}
}