diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-01 14:15:21 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-02 05:14:42 +0200 |
commit | 2a4cedace4d440978aa10757644f2f0f7a80be2f (patch) | |
tree | 5ac1d0de03bd5ef6dafaacd81997b1145cf6fad3 /libavcodec | |
parent | 55982b944738796829a82d7b397b26c937b87762 (diff) |
avcodec/movtextenc, srtenc, webvttenc: Mark encoders as init-threadsafe
They all rely on ff_ass_split(), which does not have any static state.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/movtextenc.c | 2 | ||||
-rw-r--r-- | libavcodec/srtenc.c | 4 | ||||
-rw-r--r-- | libavcodec/webvttenc.c | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c index 4e782c7856..383125b4ba 100644 --- a/libavcodec/movtextenc.c +++ b/libavcodec/movtextenc.c @@ -718,5 +718,5 @@ const AVCodec ff_movtext_encoder = { .init = mov_text_encode_init, .encode_sub = mov_text_encode_frame, .close = mov_text_encode_close, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c index 346f281af3..edc91c4013 100644 --- a/libavcodec/srtenc.c +++ b/libavcodec/srtenc.c @@ -25,6 +25,7 @@ #include "libavutil/bprint.h" #include "ass_split.h" #include "ass.h" +#include "internal.h" #define SRT_STACK_SIZE 64 @@ -299,6 +300,7 @@ const AVCodec ff_srt_encoder = { .init = srt_encode_init, .encode_sub = srt_encode_frame, .close = srt_encode_close, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; #endif @@ -312,6 +314,7 @@ const AVCodec ff_subrip_encoder = { .init = srt_encode_init, .encode_sub = srt_encode_frame, .close = srt_encode_close, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; #endif @@ -325,5 +328,6 @@ const AVCodec ff_text_encoder = { .init = srt_encode_init, .encode_sub = text_encode_frame, .close = srt_encode_close, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; #endif diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index cc47b5aca3..3181e25120 100644 --- a/libavcodec/webvttenc.c +++ b/libavcodec/webvttenc.c @@ -26,6 +26,7 @@ #include "libavutil/bprint.h" #include "ass_split.h" #include "ass.h" +#include "internal.h" #define WEBVTT_STACK_SIZE 64 typedef struct { @@ -219,4 +220,5 @@ const AVCodec ff_webvtt_encoder = { .init = webvtt_encode_init, .encode_sub = webvtt_encode_frame, .close = webvtt_encode_close, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; |