Only call inflateEnd when we were actually using the zlib code.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 31 May 2009 11:42:50 +0000 (11:42 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 31 May 2009 11:42:50 +0000 (11:42 +0000)
Originally committed as revision 19063 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/lcldec.c

index cb2b5e6..0d56303 100644 (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;