]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/internal.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / internal.h
index ed38c61d3cc881228414ed47374f2e4307e378e7..9a8b4bc336e2ab15567fccd644f34335539b6b9c 100644 (file)
@@ -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 */