mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/imm4: flush prev_frame after seeking
This commit is contained in:
parent
16f7c1f291
commit
a208c277f8
|
@ -523,6 +523,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void decode_flush(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
IMM4Context *s = avctx->priv_data;
|
||||||
|
|
||||||
|
av_frame_unref(s->prev_frame);
|
||||||
|
}
|
||||||
|
|
||||||
static av_cold int decode_close(AVCodecContext *avctx)
|
static av_cold int decode_close(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
IMM4Context *s = avctx->priv_data;
|
IMM4Context *s = avctx->priv_data;
|
||||||
|
@ -543,6 +550,7 @@ AVCodec ff_imm4_decoder = {
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_close,
|
.close = decode_close,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
|
.flush = decode_flush,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
|
||||||
FF_CODEC_CAP_INIT_CLEANUP,
|
FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
|
|
Loading…
Reference in New Issue