Commit 1d633e6a authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2570a877
...@@ -1192,6 +1192,8 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -1192,6 +1192,8 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket pkt; AVPacket pkt;
pkt.data = avpkt->data + (get_bits_count(&ctx->gb) >> 3); pkt.data = avpkt->data + (get_bits_count(&ctx->gb) >> 3);
pkt.size = get_bits_left(&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); ff_ivi_decode_frame(avctx, ctx->p_frame, &ctx->got_p_frame, &pkt);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment