Mercurial > libavcodec.hg
comparison mdec.c @ 10978:8754b8361dc9 libavcodec
Release buffer when the codec is closed.
author | reimar |
---|---|
date | Sat, 23 Jan 2010 18:04:09 +0000 |
parents | a7a2892e24de |
children | 98970e51365a |
comparison
equal
deleted
inserted
replaced
10977:a7a2892e24de | 10978:8754b8361dc9 |
---|---|
237 } | 237 } |
238 | 238 |
239 static av_cold int decode_end(AVCodecContext *avctx){ | 239 static av_cold int decode_end(AVCodecContext *avctx){ |
240 MDECContext * const a = avctx->priv_data; | 240 MDECContext * const a = avctx->priv_data; |
241 | 241 |
242 if(a->picture.data[0]) | |
243 avctx->release_buffer(avctx, &a->picture); | |
242 av_freep(&a->bitstream_buffer); | 244 av_freep(&a->bitstream_buffer); |
243 av_freep(&a->picture.qscale_table); | 245 av_freep(&a->picture.qscale_table); |
244 a->bitstream_buffer_size=0; | 246 a->bitstream_buffer_size=0; |
245 | 247 |
246 return 0; | 248 return 0; |