]> git.sesse.net Git - ffmpeg/commitdiff
swresample: swr_close()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 15 May 2014 16:27:23 +0000 (18:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 15 May 2014 16:27:23 +0000 (18:27 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/APIchanges
libswresample/swresample.c
libswresample/swresample.h
libswresample/version.h

index 0426837ab0a10e71eeffe96a099191d73c570057..a1c501d9d868399bab3c965a3bd86f8ef0c1d51e 100644 (file)
@@ -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.
 
index 54e06e1d00d7aa3377c0db4de24f8d723d051758..7076650106f23954ea099e7ffb666145a281762c 100644 (file)
@@ -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;
 
index 0525289eb0301915013d824edfc3412f9e5fef66..017a320c014d9bf6f13123dd7bf80ba859ee0fac 100644 (file)
@@ -202,6 +202,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.
  *
index 3a9287519c61b8ca46918d0e6d0523e320fe8e79..8ca9f59102ded1c35018e4346b989e0909651ddd 100644 (file)
@@ -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, \