Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
0c47b070
Commit
0c47b070
authored
Nov 30, 2020
by
Andreas Rheinhardt
Committed by
Andreas Rheinhardt
May 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/cook: Make decoder init-threadsafe
Signed-off-by:
Andreas Rheinhardt
<
andreas.rheinhardt@gmail.com
>
parent
980f002b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
cook.c
libavcodec/cook.c
+4
-2
No files found.
libavcodec/cook.c
View file @
0c47b070
...
...
@@ -45,6 +45,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/lfg.h"
#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "audiodsp.h"
#include "avcodec.h"
...
...
@@ -1071,6 +1072,7 @@ static void dump_cook_context(COOKContext *q)
*/
static
av_cold
int
cook_decode_init
(
AVCodecContext
*
avctx
)
{
static
AVOnce
init_static_once
=
AV_ONCE_INIT
;
COOKContext
*
q
=
avctx
->
priv_data
;
GetByteContext
gb
;
int
s
=
0
;
...
...
@@ -1249,7 +1251,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
}
/* Generate tables */
init_pow2table
(
);
ff_thread_once
(
&
init_static_once
,
init_pow2table
);
init_gain_table
(
q
);
init_cplscales_table
(
q
);
...
...
@@ -1301,7 +1303,7 @@ const AVCodec ff_cook_decoder = {
.
close
=
cook_decode_close
,
.
decode
=
cook_decode_frame
,
.
capabilities
=
AV_CODEC_CAP_DR1
,
.
caps_internal
=
FF_CODEC_CAP_INIT_CLEANUP
,
.
sample_fmts
=
(
const
enum
AVSampleFormat
[])
{
AV_SAMPLE_FMT_FLTP
,
AV_SAMPLE_FMT_NONE
},
.
caps_internal
=
FF_CODEC_CAP_INIT_THREADSAFE
|
FF_CODEC_CAP_INIT_CLEANUP
,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment