summaryrefslogtreecommitdiff
path: root/libavcodec/internal.h
diff options
context:
space:
mode:
authorAsh Hughes <ashes-iontach@hotmail.com>2012-10-19 01:12:56 +0000
committerMichael Niedermayer <michaelni@gmx.at>2012-10-19 18:05:12 +0200
commit2470851f1228006473d9ce825604aa1cfe1c5916 (patch)
tree47d60b5381f5777f54a26e20eb85c991b5b9939e /libavcodec/internal.h
parent7abf394814d818973db562102f21ab9d10540840 (diff)
lavc: enable recursively using avcodec_open2/close.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r--libavcodec/internal.h12
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 */