aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/opus_parser.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-11 13:45:31 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-08 11:52:52 +0200
commitaa8f8748caa15d99a77537cbd5bbec014a6630b8 (patch)
tree5524b7e9e5fa8a202025dd6ec33d5af383a80fde /libavcodec/opus_parser.c
parent04012468459fb896e3a24202d7cc69b1cdda1db4 (diff)
downloadffmpeg-aa8f8748caa15d99a77537cbd5bbec014a6630b8.tar.gz
avcodec/pthread_frame: Fix cleanup during init
In case an error happened when setting up the child threads, ff_frame_thread_init() would up until now call ff_frame_thread_free() to clean up all threads set up so far, including the current, not properly initialized one. But a half-allocated context needs special handling which ff_frame_thread_frame_free() doesn't provide. Notably, if allocating the AVCodecInternal, the codec's private data or setting the options fails, the codec's close function will be called (if there is one); it will also be called if the codec's init function fails, regardless of whether the FF_CODEC_CAP_INIT_CLEANUP is set. This is not supported by all codecs; in ticket #9099 it led to a crash. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit e9b66175793e5c2af19beefe8e143f6e4901b5df)
Diffstat (limited to 'libavcodec/opus_parser.c')
0 files changed, 0 insertions, 0 deletions