From 908425c758569577f4ba4b6e2772308112ad1385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sun, 31 May 2009 11:42:50 +0000 Subject: [PATCH] Only call inflateEnd when we were actually using the zlib code. Originally committed as revision 19063 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/lcldec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index cb2b5e66fd..0d56303298 100644 --- a/libavcodec/lcldec.c +++ b/libavcodec/lcldec.c @@ -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;