summaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-15 18:27:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-15 18:27:23 +0200
commit96cb4c87183798d1badd15a8727efba634023fc1 (patch)
tree1b8acf55c2b053551369cac5ab24c7df9499ef0b /libswresample
parent2c7d3ecfc962fe2d2afa84cd347136060468fe0e (diff)
swresample: swr_close()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/swresample.c4
-rw-r--r--libswresample/swresample.h10
-rw-r--r--libswresample/version.h2
3 files changed, 15 insertions, 1 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 54e06e1d00..7076650106 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 0525289eb0..017a320c01 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 3a9287519c..8ca9f59102 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, \