[FFmpeg-devel] [PATCH 06/23] avcodec/zmbvenc: Mark encoder as init-threadsafe

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu May 6 08:11:04 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/zmbvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index d0c353d0df..b431476241 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -442,5 +442,5 @@ const AVCodec ff_zmbv_encoder = {
 #endif //ZMBV_ENABLE_24BPP
                                                      AV_PIX_FMT_BGR0,
                                                      AV_PIX_FMT_NONE },
-    .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