summaryrefslogtreecommitdiff
path: root/libavcodec/Makefile
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-15 10:46:09 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-19 00:18:35 +0100
commitdd8a55cb3e2014934a176a9962010a3c87d12704 (patch)
tree52aebbfec3baca47f46e837c96fd5eedc18969ba /libavcodec/Makefile
parentdb57a5370bd37105d389a45b04bf4970802407ec (diff)
avcodec/zlib_wrapper: Add wrappers for zlib inflateInit, inflateEnd
It is not documented to be safe to call inflateEnd() on a z_stream that has never been successfully been initialized by inflateInit(), but just zeroed. It just happens to work and several codecs rely on this (they have FF_CODEC_CAP_INIT_CLEANUP set and even call inflateEnd() when inflateInit() failed or has never been called). To avoid this, other codecs recorded whether their zstream has been initialized successfully or not. This commit adds wrappers for inflateInit() and inflateEnd() that do what these other codecs do; furthermore, they also take care of properly setting up the zstream before inflateInit() and emit an error message in case of error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/Makefile')
-rw-r--r--libavcodec/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 1905258f43..7810528559 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -105,6 +105,7 @@ OBJS-$(CONFIG_HUFFYUVENCDSP) += huffyuvencdsp.o
OBJS-$(CONFIG_IDCTDSP) += idctdsp.o simple_idct.o jrevdct.o
OBJS-$(CONFIG_IIRFILTER) += iirfilter.o
OBJS-$(CONFIG_MDCT15) += mdct15.o
+OBJS-$(CONFIG_INFLATE_WRAPPER) += zlib_wrapper.o
OBJS-$(CONFIG_INTRAX8) += intrax8.o intrax8dsp.o msmpeg4data.o
OBJS-$(CONFIG_IVIDSP) += ivi_dsp.o
OBJS-$(CONFIG_JNI) += ffjni.o jni.o