[SCM] libav/experimental: lavr: add a function for checking whether AVAudioResampleContext is open

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:01:28 UTC 2014


The following commit has been merged in the experimental branch:
commit 7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731
Author: Anton Khirnov <anton at khirnov.net>
Date:   Thu Apr 25 20:08:49 2013 +0200

    lavr: add a function for checking whether AVAudioResampleContext is open

diff --git a/doc/APIchanges b/doc/APIchanges
index d8f5f51..ec311a5 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -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.
diff --git a/libavresample/avresample.h b/libavresample/avresample.h
index d26f2ca..3358628 100644
--- a/libavresample/avresample.h
+++ b/libavresample/avresample.h
@@ -172,6 +172,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.
  *
  * This closes the context, but it does not change the parameters. The context
diff --git a/libavresample/utils.c b/libavresample/utils.c
index 2dd3d06..306b67c 100644
--- a/libavresample/utils.c
+++ b/libavresample/utils.c
@@ -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);
diff --git a/libavresample/version.h b/libavresample/version.h
index fce5770..ca836e4 100644
--- a/libavresample/version.h
+++ b/libavresample/version.h
@@ -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, \

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list