[FFmpeg-devel] avcodec/internal: Expand the documentation for FF_CODEC_CAP_INIT_THREADSAFE

Submitted by Michael Niedermayer on Feb. 7, 2017, 1:54 a.m.

Details

Message ID 20170207015410.31260-1-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Feb. 7, 2017, 1:54 a.m.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/internal.h | 9 +++++++++
 1 file changed, 9 insertions(+)

Patch hide | download patch | download mbox

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)
 /**