1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00
FFmpeg/libavcodec
Andreas Rheinhardt aa8f8748ca 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)
2021-04-08 11:52:52 +02:00
..
2021-02-27 17:09:44 +01:00
2021-01-01 15:25:48 +01:00
2021-01-01 15:25:48 +01:00
2021-03-05 19:45:00 +02:00
2020-12-08 17:51:48 +01:00
2020-12-08 17:51:47 +01:00
2021-03-09 13:41:22 +01:00
2021-02-27 17:09:44 +01:00
2021-03-01 06:10:44 +01:00
2021-03-01 17:36:42 +01:00
2021-03-01 17:36:42 +01:00
2021-02-09 15:01:34 +01:00
2021-03-09 13:41:22 +01:00
2021-03-08 19:19:19 +01:00
2021-03-09 13:41:22 +01:00
2021-01-08 05:05:10 +01:00
2021-01-21 17:13:54 +00:00
2021-01-21 17:13:54 +00:00
2021-01-21 17:13:54 +00:00
2021-03-01 06:10:44 +01:00
2021-03-08 19:19:19 +01:00
2021-03-09 13:41:22 +01:00
2020-12-31 11:49:43 +01:00
2020-12-08 17:51:47 +01:00
2021-02-04 17:26:06 +01:00
2021-01-01 15:25:48 +01:00
2021-01-01 15:25:48 +01:00
2021-03-01 17:36:16 +01:00
2021-03-09 13:41:22 +01:00
2021-03-09 13:41:22 +01:00
2021-02-02 14:29:33 +01:00
2021-03-09 13:41:22 +01:00
2021-04-03 13:29:30 +02:00
2021-04-01 11:38:44 +02:00
2021-03-05 19:45:00 +02:00
2021-03-05 19:45:00 +02:00
2021-04-02 21:40:54 +02:00
2021-03-09 13:41:22 +01:00
2021-01-25 00:18:47 +01:00
2021-01-01 15:25:48 +01:00