mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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>
This commit is contained in:
parent
26e7d7b14e
commit
804bf898da
4 changed files with 63 additions and 33 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue