From 117b432748ca87de4cd0f09d9b1495545e264733 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 11 Mar 2015 20:43:58 +0000 Subject: lavc: Introduce AVCodec internal capabilities This field is designed for marking codec properties useful to lavc internals. Two internal capabilities are added: - FF_CODEC_CAP_INIT_THREADSAFE: codec can be opened without locks; - FF_CODEC_CAP_INIT_CLEANUP: codec frees memory if initialization fails. --- libavcodec/internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libavcodec/internal.h') diff --git a/libavcodec/internal.h b/libavcodec/internal.h index a68d6134e3..a681329f20 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -33,6 +33,16 @@ #include "avcodec.h" #include "config.h" +/** + * Codec is thread safe. + */ +#define FF_CODEC_CAP_INIT_THREADSAFE (1 << 0) +/** + * Codec cleans up memory on init failure. + */ +#define FF_CODEC_CAP_INIT_CLEANUP (1 << 1) + + #define FF_SANE_NB_CHANNELS 63U #define FF_SIGNBIT(x) (x >> CHAR_BIT * sizeof(x) - 1) -- cgit v1.2.3