diff mbox series

[FFmpeg-devel,13/23] avcodec/mscc: Mark decoder as init-threadsafe

Message ID VI1PR0301MB2159310FC5CF0575EA01923D8F589@VI1PR0301MB2159.eurprd03.prod.outlook.com
State Accepted
Commit 730b8182b19b191e9d9b7a9f4e7685f8d1f91c7f
Headers show
Series [FFmpeg-devel,01/23] avcodec/ljpegenc: Mark encoder as init-threadsafe
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt May 6, 2021, 5:11 a.m. UTC
Initializing zlib in the way we do here is threadsafe, see
https://www.zlib.net/zlib_faq.html#faq21

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mscc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c
index 027eb16085..d9a6de094a 100644
--- a/libavcodec/mscc.c
+++ b/libavcodec/mscc.c
@@ -262,7 +262,7 @@  const AVCodec ff_mscc_decoder = {
     .close            = decode_close,
     .decode           = decode_frame,
     .capabilities     = AV_CODEC_CAP_DR1,
-    .caps_internal    = FF_CODEC_CAP_INIT_CLEANUP,
+    .caps_internal    = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
 };
 
 const AVCodec ff_srgc_decoder = {
@@ -275,5 +275,5 @@  const AVCodec ff_srgc_decoder = {
     .close            = decode_close,
     .decode           = decode_frame,
     .capabilities     = AV_CODEC_CAP_DR1,
-    .caps_internal    = FF_CODEC_CAP_INIT_CLEANUP,
+    .caps_internal    = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
 };