diff options
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r-- | libavcodec/internal.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index ed38c61d3c..9a8b4bc336 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -178,4 +178,16 @@ int ff_get_logical_cpus(AVCodecContext *avctx); int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx); +/** + * Call avcodec_open2 recursively by decrementing counter, unlocking mutex, + * calling the function and then restoring again. Assumes the mutex is + * already locked + */ +int ff_codec_open2_recursive(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options); + +/** + * Call avcodec_close recursively, counterpart to avcodec_open2_recursive. + */ +int ff_codec_close_recursive(AVCodecContext *avctx); + #endif /* AVCODEC_INTERNAL_H */ |