summaryrefslogtreecommitdiff
path: root/libavcodec/mdec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-01-23 18:04:09 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-01-23 18:04:09 +0000
commit6231d0983b1e773c5244f84b0fd2b6a26c01eea7 (patch)
treee660eac923abfb31c4058cdbb874f5f4dd25d85d /libavcodec/mdec.c
parentb9e3f85dbc5ad3e5c64808173b494ca5164b6908 (diff)
Release buffer when the codec is closed.
Originally committed as revision 21405 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mdec.c')
-rw-r--r--libavcodec/mdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index fa9661e19f..9ae2258583 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -239,6 +239,8 @@ static av_cold int decode_init(AVCodecContext *avctx){
static av_cold int decode_end(AVCodecContext *avctx){
MDECContext * const a = avctx->priv_data;
+ if(a->picture.data[0])
+ avctx->release_buffer(avctx, &a->picture);
av_freep(&a->bitstream_buffer);
av_freep(&a->picture.qscale_table);
a->bitstream_buffer_size=0;