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

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu May 6 08:11:11 EEST 2021


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 at outlook.com>
---
 libavcodec/mscc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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,
 };
-- 
2.27.0



More information about the ffmpeg-devel mailing list