Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-05-13 01:11:37 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 14:33:45 +0300
commit0c903ef05afc0b899eccd7be9e873ee6187cddee (patch)
treea0f5ce95fb8e30878f2da375d3e511c04f24429b /libavcodec
parenta24bbffebe8570d056f2b287fa8fc992820248e1 (diff)
avcodec/ivi: Clear got_p_frame before decoding a new frame using it
Fixes: assertion failure Fixes: 21666/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5706468994318336 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 1d633e6a0a61118c9b2d1785d96bdebaa8c38592) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ivi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c
index 8b197c64eb..4b32a00b06 100644
--- a/libavcodec/ivi.c
+++ b/libavcodec/ivi.c
@@ -1174,6 +1174,8 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket pkt;
pkt.data = avpkt->data + (get_bits_count(&ctx->gb) >> 3);
pkt.size = get_bits_left(&ctx->gb) >> 3;
+ ctx->got_p_frame = 0;
+ av_frame_unref(ctx->p_frame);
ff_ivi_decode_frame(avctx, ctx->p_frame, &ctx->got_p_frame, &pkt);
}
}