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:
authorRonald S. Bultje <rsbultje@gmail.com>2012-02-25 04:27:53 +0400
committerRonald S. Bultje <rsbultje@gmail.com>2012-02-25 19:53:44 +0400
commit6c4c27adb61b2881a94ce5c7d97ee1c8adadb5fe (patch)
tree0b883e4d0a8448c7adc1e22b72ef9a2e22714cd1 /libavcodec/kgv1dec.c
parentcd40c31ee9ad2cca6f3635950b002fd46be07e98 (diff)
kgv1: release reference picture on size change.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/kgv1dec.c')
-rw-r--r--libavcodec/kgv1dec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index ca639b7c5d..42bbcae530 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -61,8 +61,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
if (av_image_check_size(w, h, 0, avctx))
return -1;
- if (w != avctx->width || h != avctx->height)
+ if (w != avctx->width || h != avctx->height) {
+ if (c->prev.data[0])
+ avctx->release_buffer(avctx, &c->prev);
avcodec_set_dimensions(avctx, w, h);
+ }
maxcnt = w * h;