summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec_fixed.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-17 18:44:18 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-08 17:51:47 +0100
commitc778f2266dcea9c462006a63a43598ec655060d6 (patch)
treedb3968b7bae9981e7391d82bf903ba6bf1e7fc6d /libavcodec/mpegaudiodec_fixed.c
parentb29a3f3e0f6128f3effa854a3a7bfed62feeeb1c (diff)
avcodec/mpegaudiodec: Make decoders init-threadsafe
Simple now that ff_mpadsp_init() and ff_mpa_synth_init_* are thread-safe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mpegaudiodec_fixed.c')
-rw-r--r--libavcodec/mpegaudiodec_fixed.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec_fixed.c b/libavcodec/mpegaudiodec_fixed.c
index 5ba1cc66fb..6fe372b38f 100644
--- a/libavcodec/mpegaudiodec_fixed.c
+++ b/libavcodec/mpegaudiodec_fixed.c
@@ -53,6 +53,7 @@ AVCodec ff_mp1_decoder = {
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_MP2_DECODER
@@ -70,6 +71,7 @@ AVCodec ff_mp2_decoder = {
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_MP3_DECODER
@@ -87,6 +89,7 @@ AVCodec ff_mp3_decoder = {
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_MP3ADU_DECODER
@@ -104,6 +107,7 @@ AVCodec ff_mp3adu_decoder = {
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
#if CONFIG_MP3ON4_DECODER
@@ -121,6 +125,6 @@ AVCodec ff_mp3on4_decoder = {
.flush = flush_mp3on4,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};
#endif