Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-11-26 09:53:52 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-03-30 06:50:49 +0300
commit639728f51a9fa5e321effad5909c1e37df0e80bb (patch)
tree70fb345421fd89a6e8cdd1a834a45875d491390c /libavformat/avio_internal.h
parent5cdd2ebb55f760d06d35b71a421b8433851b92e9 (diff)
avformat/aviobuf: Add function to reset dynamic buffer
Resetting a dynamic buffer means to keep the AVIOContext and the internal buffer used by the dynamic buffer. This is done in order to save (re)allocations when one has a workflow where one opens and closes dynamic buffers in sequence. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/avio_internal.h')
-rw-r--r--libavformat/avio_internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index eb628ac493..c575df8035 100644
--- a/libavformat/avio_internal.h
+++ b/libavformat/avio_internal.h
@@ -172,6 +172,13 @@ int ffio_open_whitelist(AVIOContext **s, const char *url, int flags,
int ffio_close_null_buf(AVIOContext *s);
/**
+ * Reset a dynamic buffer.
+ *
+ * Resets everything, but keeps the allocated buffer for later use.
+ */
+void ffio_reset_dyn_buf(AVIOContext *s);
+
+/**
* Free a dynamic buffer.
*
* @param s a pointer to an IO context opened by avio_open_dyn_buf()