diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-23 06:34:11 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-26 03:04:28 +0100 |
commit | c85fcc96b79a502b1d2cd022c6f0c638e4527732 (patch) | |
tree | b2a30ed5e6930327a399027a8ce15050ce214574 /libavcodec/nvdec_vp8.c | |
parent | e9b66175793e5c2af19beefe8e143f6e4901b5df (diff) | |
download | ffmpeg-c85fcc96b79a502b1d2cd022c6f0c638e4527732.tar.gz |
avcodec/pthread_frame: Check initializing mutexes/condition variables
Up until now, initializing the mutexes/condition variables wasn't
checked by ff_frame_thread_init(). This commit changes this.
Given that it is not documented to be save to destroy a zeroed but
otherwise uninitialized mutex/condition variable, one has to choose
between two approaches: Either one duplicates the code to free them
in ff_frame_thread_init() in case of errors or one records which have
been successfully initialized. This commit takes the latter approach:
For each of the two structures with mutexes/condition variables
an array containing the offsets of the members to initialize is added.
Said array is used both for initializing and freeing and the only thing
that needs to be recorded is how many of these have been successfully
initialized.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/nvdec_vp8.c')
0 files changed, 0 insertions, 0 deletions