diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-09 22:25:41 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-18 19:58:56 +0200 |
commit | 6aad1204ccea90113d19a8b829c8b81891f9474e (patch) | |
tree | 8610a6ee598d1ff4cbf8225877a11b4c6713a244 /libavcodec/codec_internal.h | |
parent | c597510434f2950df09d218106279c880bdc146c (diff) | |
download | ffmpeg-6aad1204ccea90113d19a8b829c8b81891f9474e.tar.gz |
avcodec: Add FF_CODEC_CAP_NOT_INIT_THREADSAFE
This is in preparation of switching the default init-thread-safety
to a codec being init-thread-safe.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/codec_internal.h')
-rw-r--r-- | libavcodec/codec_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/codec_internal.h b/libavcodec/codec_internal.h index 5df286ce52..a90c19d61a 100644 --- a/libavcodec/codec_internal.h +++ b/libavcodec/codec_internal.h @@ -30,6 +30,13 @@ */ #define FF_CODEC_CAP_INIT_THREADSAFE (1 << 0) /** + * The codec is not known to be init-threadsafe (i.e. it might be unsafe + * to initialize this codec and another codec concurrently, typically because + * the codec calls external APIs that are not known to be thread-safe). + * Therefore calling the codec's init function needs to be guarded with a lock. + */ +#define FF_CODEC_CAP_NOT_INIT_THREADSAFE (1 << 9) +/** * The codec allows calling the close function for deallocation even if * the init function returned a failure. Without this capability flag, a * codec does such cleanup internally when returning failures from the |