[FFmpeg-devel] [PATCH] avcodec/internal: Expand the documentation for FF_CODEC_CAP_INIT_THREADSAFE
Michael Niedermayer
michael at niedermayer.cc
Tue Feb 7 03:54:10 EET 2017
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/internal.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index c92dba472a..a72f8628db 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -36,6 +36,15 @@
/**
* The codec does not modify any global variables in the init function,
* allowing to call the init function without locking any global mutexes.
+ * If this is not set, the core code uses the lock manager registered with
+ * av_lockmgr_register() or the default fallback to protect codec init.
+ *
+ * Using a per codec lock is more efficient than using one for all codecs to
+ * provide thread saftey as the locking happens at finer granularity during
+ * one time initilization.
+ *
+ * @Note, with or without this flag the public codec init/decode/encode/... API is
+ * threadsafe.
*/
#define FF_CODEC_CAP_INIT_THREADSAFE (1 << 0)
/**
--
2.11.0
More information about the ffmpeg-devel
mailing list