[FFmpeg-cvslog] swresample: swr_close()
Michael Niedermayer
git at videolan.org
Thu May 15 18:47:02 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu May 15 18:27:23 2014 +0200| [96cb4c87183798d1badd15a8727efba634023fc1] | committer: Michael Niedermayer
swresample: swr_close()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96cb4c87183798d1badd15a8727efba634023fc1
---
doc/APIchanges | 3 +++
libswresample/swresample.c | 4 ++++
libswresample/swresample.h | 10 ++++++++++
libswresample/version.h | 2 +-
4 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 0426837..a1c501d 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil: 2012-10-22
API changes, most recent first:
+2014-05-15 - xxxxxxx - lswr 0.19.100 - swresample.h
+ Add swr_close()
+
2014-xx-xx - xxxxxxx - lavu 53.14.0 - pixfmt.h
Add AV_PIX_FMT_VDA for new-style VDA acceleration.
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 54e06e1..7076650 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -251,6 +251,10 @@ av_cold void swr_free(SwrContext **ss){
av_freep(ss);
}
+av_cold void swr_close(SwrContext *s){
+ clear_context(s);
+}
+
av_cold int swr_init(struct SwrContext *s){
int ret;
diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index 0525289..017a320 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -203,6 +203,16 @@ struct SwrContext *swr_alloc_set_opts(struct SwrContext *s,
void swr_free(struct SwrContext **s);
/**
+ * Closes the context so that swr_is_initialized() returns 0.
+ *
+ * the context can be brougt back to life by running swr_init(),
+ * swr_init() can also be used without swr_close().
+ * This function is mainly provided for simplifying the usecase
+ * where one tries to support libavresample and libswresample
+ */
+void swr_close(struct SwrContext *s);
+
+/**
* Convert audio.
*
* in and in_count can be set to 0 to flush the last few samples out at the
diff --git a/libswresample/version.h b/libswresample/version.h
index 3a92875..8ca9f59 100644
--- a/libswresample/version.h
+++ b/libswresample/version.h
@@ -29,7 +29,7 @@
#include "libavutil/avutil.h"
#define LIBSWRESAMPLE_VERSION_MAJOR 0
-#define LIBSWRESAMPLE_VERSION_MINOR 18
+#define LIBSWRESAMPLE_VERSION_MINOR 19
#define LIBSWRESAMPLE_VERSION_MICRO 100
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
More information about the ffmpeg-cvslog
mailing list