]> git.sesse.net Git - ffmpeg/commitdiff
lavr: add a function for checking whether AVAudioResampleContext is open
authorAnton Khirnov <anton@khirnov.net>
Thu, 25 Apr 2013 18:08:49 +0000 (20:08 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sat, 22 Feb 2014 19:52:36 +0000 (20:52 +0100)
doc/APIchanges
libavresample/avresample.h
libavresample/utils.c
libavresample/version.h

index d8f5f51b9086cfef5f37a241fe72db34b0440574..ec311a51778c2e6fc0e5dcb92fcf60fb76a1ddc9 100644 (file)
@@ -13,6 +13,9 @@ libavutil:     2013-12-xx
 
 API changes, most recent first:
 
+2014-02-xx - xxxxxxx - lavr 1.2.0 - avresample.h
+  Add avresample_is_open() for checking whether a resample context is open.
+
 2014-xx-xx - xxxxxxx - lavu 53.04.0  - opt.h
   Add AV_OPT_FLAG_EXPORT and AV_OPT_FLAG_READONLY to mark options meant (only)
   for reading.
index d26f2ca22344eff542fb2eac6a819285dfbb34e3..3358628e3710f3e036f53da86549da76f2a7e280 100644 (file)
@@ -171,6 +171,14 @@ AVAudioResampleContext *avresample_alloc_context(void);
  */
 int avresample_open(AVAudioResampleContext *avr);
 
+/**
+ * Check whether an AVAudioResampleContext is open or closed.
+ *
+ * @param avr AVAudioResampleContext to check
+ * @return 1 if avr is open, 0 if avr is closed.
+ */
+int avresample_is_open(AVAudioResampleContext *avr);
+
 /**
  * Close AVAudioResampleContext.
  *
index 2dd3d0616fd3a7f92d23f0949dc080c1ff04a601..306b67c7ad870a47dfb204d53e2d92b663c38a7d 100644 (file)
@@ -254,6 +254,11 @@ error:
     return ret;
 }
 
+int avresample_is_open(AVAudioResampleContext *avr)
+{
+    return !!avr->out_fifo;
+}
+
 void avresample_close(AVAudioResampleContext *avr)
 {
     ff_audio_data_free(&avr->in_buffer);
index fce5770c62cdb6c4bb8dd42a4765642356b70fb0..ca836e4a56a5afbfd7a7739d989abdb0db74408f 100644 (file)
@@ -28,7 +28,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVRESAMPLE_VERSION_MAJOR  1
-#define LIBAVRESAMPLE_VERSION_MINOR  1
+#define LIBAVRESAMPLE_VERSION_MINOR  2
 #define LIBAVRESAMPLE_VERSION_MICRO  0
 
 #define LIBAVRESAMPLE_VERSION_INT  AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \