Commit d0004a19 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/kgv1dec: fix memleak, reintroduce lost decode_flush() call

fixes regression since 80d44190 and 1a0370ad
this reverts the buggy changes in these 2 commits
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2fd39642
...@@ -167,6 +167,12 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -167,6 +167,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0; return 0;
} }
static av_cold int decode_end(AVCodecContext *avctx)
{
decode_flush(avctx);
return 0;
}
AVCodec ff_kgv1_decoder = { AVCodec ff_kgv1_decoder = {
.name = "kgv1", .name = "kgv1",
.long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"), .long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"),
...@@ -174,6 +180,7 @@ AVCodec ff_kgv1_decoder = { ...@@ -174,6 +180,7 @@ AVCodec ff_kgv1_decoder = {
.id = AV_CODEC_ID_KGV1, .id = AV_CODEC_ID_KGV1,
.priv_data_size = sizeof(KgvContext), .priv_data_size = sizeof(KgvContext),
.init = decode_init, .init = decode_init,
.close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.flush = decode_flush, .flush = decode_flush,
.capabilities = CODEC_CAP_DR1, .capabilities = CODEC_CAP_DR1,
......
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