diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-06-29 23:39:16 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-01 15:35:11 +0200 |
commit | 804bf898dad32813c6bc05ae19d0dcfd45cd8d8a (patch) | |
tree | a31d804f999d9bd6b3bf3ec381342a9346d6c411 /libavcodec/utils.c | |
parent | 26e7d7b14e7a3912aa0ce59ebab191a9c2d9edfa (diff) | |
download | ffmpeg-804bf898dad32813c6bc05ae19d0dcfd45cd8d8a.tar.gz |
avcodec/pthread_slice: Don't reinitialise initialised mutex
It results in undefined behaviour. Instead initialize the mutexes
and condition variables once during init (and check these
initializations).
Also combine the corresponding mutex and condition variable
into one structure so that one can allocate their array
jointly.
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 940f25fe7a..f78475d0ad 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -958,6 +958,11 @@ int ff_thread_can_start_frame(AVCodecContext *avctx) return 1; } +int ff_slice_thread_init_progress(AVCodecContext *avctx) +{ + return 0; +} + int ff_alloc_entries(AVCodecContext *avctx, int count) { return 0; |