aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-17 02:43:26 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-17 02:50:50 +0100
commitd0004a1959ec200bad16c7e6cc03b83c17d66cfe (patch)
tree9c527baa35b1b2e448f15b794591f3a13193b945 /libavcodec
parent2fd39642c9aa34bae7e08fbdcba15ef1ae6f3b2e (diff)
downloadffmpeg-d0004a1959ec200bad16c7e6cc03b83c17d66cfe.tar.gz
avcodec/kgv1dec: fix memleak, reintroduce lost decode_flush() call
fixes regression since 80d44190c4d909e9685d04bcde693da3e2441dfd and 1a0370ad94de094a5ac754e790d4ec8d8d0d9ee7 this reverts the buggy changes in these 2 commits Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/kgv1dec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index 0c58bade3f..edbc2b2666 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -167,6 +167,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0;
}
+static av_cold int decode_end(AVCodecContext *avctx)
+{
+ decode_flush(avctx);
+ return 0;
+}
+
AVCodec ff_kgv1_decoder = {
.name = "kgv1",
.long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"),
@@ -174,6 +180,7 @@ AVCodec ff_kgv1_decoder = {
.id = AV_CODEC_ID_KGV1,
.priv_data_size = sizeof(KgvContext),
.init = decode_init,
+ .close = decode_end,
.decode = decode_frame,
.flush = decode_flush,
.capabilities = CODEC_CAP_DR1,