summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorRobert Nagy <ronag89@gmail.com>2012-04-16 08:17:25 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-04-20 01:01:17 +0200
commit65fa7bc1f8c1bfacc6bdb92cdcc496aaa73d4179 (patch)
tree3ffe40dad23c7dd51b5f13b30c0aac52242d2b9e /libavfilter
parent455fcf29b8482009d2ad13da56cd1122973dc858 (diff)
lavfi: add avfilter_unref_bufferp()
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfilter.c6
-rw-r--r--libavfilter/avfilter.h9
-rw-r--r--libavfilter/version.h2
3 files changed, 16 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 141fb9d7ca..28c2599d0e 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -160,6 +160,12 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref)
av_free(ref);
}
+void avfilter_unref_bufferp(AVFilterBufferRef **ref)
+{
+ avfilter_unref_buffer(*ref);
+ *ref = NULL;
+}
+
void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
AVFilterPad **pads, AVFilterLink ***links,
AVFilterPad *newpad)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 9c7a2e5bbf..fef348d8cc 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -188,6 +188,15 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask);
void avfilter_unref_buffer(AVFilterBufferRef *ref);
/**
+ * Remove a reference to a buffer and set the pointer to NULL.
+ * If this is the last reference to the buffer, the buffer itself
+ * is also automatically freed.
+ *
+ * @param ref pointer to the buffer reference
+ */
+void avfilter_unref_bufferp(AVFilterBufferRef **ref);
+
+/**
* A list of supported formats for one end of a filter link. This is used
* during the format negotiation process to try to pick the best format to
* use to minimize the number of necessary conversions. Each filter gives a
diff --git a/libavfilter/version.h b/libavfilter/version.h
index e8e9f27566..9f53651b17 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -29,7 +29,7 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 2
-#define LIBAVFILTER_VERSION_MINOR 70
+#define LIBAVFILTER_VERSION_MINOR 71
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \