diff mbox series

[FFmpeg-devel,6/6] avcodec/vp[56]: Mark decoders as init-threadsafe

Message ID AM7PR03MB666096C8B81DE5252467DA508F309@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit b45060114de164a0c0e7617cb0c85fd3ebf91140
Headers show
Series [FFmpeg-devel,1/6] avcodec/vp6: Check initializing VP6A context | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 11, 2022, 8:51 a.m. UTC
Nothing with static storage duration is initialized by these codecs.

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

Patch

diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c
index dc24f5b096..6146fbbc3a 100644
--- a/libavcodec/vp5.c
+++ b/libavcodec/vp5.c
@@ -312,5 +312,5 @@  const AVCodec ff_vp5_decoder = {
     .close          = vp56_free,
     .decode         = ff_vp56_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,
 };
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index ae8e223349..40d266916e 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -721,7 +721,7 @@  const AVCodec ff_vp6_decoder = {
     .close          = vp6_decode_free,
     .decode         = ff_vp56_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,
 };
 
 /* flash version, not flipped upside-down */
@@ -735,7 +735,7 @@  const AVCodec ff_vp6f_decoder = {
     .close          = vp6_decode_free,
     .decode         = ff_vp56_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,
 };
 
 /* flash version, not flipped upside-down, with alpha channel */
@@ -749,5 +749,5 @@  const AVCodec ff_vp6a_decoder = {
     .close          = vp6_decode_free,
     .decode         = ff_vp56_decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
-    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
 };