summaryrefslogtreecommitdiff
path: root/libavcodec/lcldec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r--libavcodec/lcldec.c3
1 files changed, 2 insertions, 1 deletions
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;