diff mbox series

[FFmpeg-devel,19/23] avcodec/pngenc: Mark encoders as init-threadsafe

Message ID VI1PR0301MB21596F6AC084389C4B7131F58F589@VI1PR0301MB2159.eurprd03.prod.outlook.com
State Accepted
Commit 413ec81ba8303468aca1c7c83bfd1118854987d0
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/pngenc.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 831223be63..a398155100 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -1140,6 +1140,7 @@  const AVCodec ff_png_encoder = {
         AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
     },
     .priv_class     = &pngenc_class,
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
 };
 
 const AVCodec ff_apng_encoder = {
@@ -1161,4 +1162,5 @@  const AVCodec ff_apng_encoder = {
         AV_PIX_FMT_NONE
     },
     .priv_class     = &apngenc_class,
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
 };