diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-20 18:18:36 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-20 21:19:29 +0200 |
commit | 718e03e5f297564b828730dfc012fa3f6fbf576b (patch) | |
tree | 27aec99b25704a12c688ecf8bbfc059202cfb0a7 /libavresample/audio_data.c | |
parent | f40e9b13554d88cbdd6cd2b4a3da2cbea9590f5d (diff) | |
download | ffmpeg-718e03e5f297564b828730dfc012fa3f6fbf576b.tar.gz |
avcodec/jpeglsdec: Don't presume the context to contain a JLSState
Before 9b3c46a081a9f01559082bf7a154fc6be1e06c18 every call to
ff_jpegls_decode_picture() allocated and freed a JLSState. This commit
instead put said structure into the context of the JPEG-LS decoder to
avoid said allocation. But said function can also be called from other
MJPEG-based decoders and their contexts doesn't contain said structure,
leading to segfaults. This commit fixes this: The JLSState is now
allocated on the first call to ff_jpegls_decode_picture() and stored in
the context.
Found-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavresample/audio_data.c')
0 files changed, 0 insertions, 0 deletions