diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-15 10:46:09 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-19 00:18:35 +0100 |
commit | dd8a55cb3e2014934a176a9962010a3c87d12704 (patch) | |
tree | 52aebbfec3baca47f46e837c96fd5eedc18969ba /libavcodec/dnxhddec.c | |
parent | db57a5370bd37105d389a45b04bf4970802407ec (diff) | |
download | ffmpeg-dd8a55cb3e2014934a176a9962010a3c87d12704.tar.gz |
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/dnxhddec.c')
0 files changed, 0 insertions, 0 deletions