summaryrefslogtreecommitdiff
path: root/libavresample
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-22 21:05:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-22 21:06:02 +0100
commit5367c0be623885eb0fcd0542564150d79d881a1c (patch)
treebb2a038ef12ee9a02f77fea7129356f5c893f07c /libavresample
parent55479f42ce60a2e3a5c468b6953ee232110d016b (diff)
parent7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731 (diff)
Merge commit '7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731'
* commit '7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731': lavr: add a function for checking whether AVAudioResampleContext is open Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavresample')
-rw-r--r--libavresample/avresample.h8
-rw-r--r--libavresample/utils.c5
-rw-r--r--libavresample/version.h2
3 files changed, 14 insertions, 1 deletions
diff --git a/libavresample/avresample.h b/libavresample/avresample.h
index f62e53303d..dc392ad076 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 db1e08701a..37c3f90afa 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 4495c2f3c7..d865ad2d23 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, \