Only call inflateEnd when we were actually using the zlib code.

Originally committed as revision 19063 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Reimar Döffinger 2009-05-31 11:42:50 +00:00
parent 4ad3df9da2
commit 908425c758
1 changed files with 2 additions and 1 deletions

View File

@ -593,7 +593,8 @@ static av_cold int decode_end(AVCodecContext *avctx)
if (c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
#if CONFIG_ZLIB_DECODER
inflateEnd(&c->zstream);
if (avctx->codec_id == CODEC_ID_ZLIB)
inflateEnd(&c->zstream);
#endif
return 0;