Release buffer when the codec is closed.

Originally committed as revision 21405 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Reimar Döffinger 2010-01-23 18:04:09 +00:00
parent b9e3f85dbc
commit 6231d0983b
1 changed files with 2 additions and 0 deletions

View File

@ -239,6 +239,8 @@ static av_cold int decode_init(AVCodecContext *avctx){
static av_cold int decode_end(AVCodecContext *avctx){ static av_cold int decode_end(AVCodecContext *avctx){
MDECContext * const a = avctx->priv_data; 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->bitstream_buffer);
av_freep(&a->picture.qscale_table); av_freep(&a->picture.qscale_table);
a->bitstream_buffer_size=0; a->bitstream_buffer_size=0;