summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-29 18:43:45 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-08-04 21:49:05 +0200
commit8ef740ce01abff3bc7df0f79803a3dc781d89daa (patch)
tree5acd8a9e7edd7e5003e7523ed35fb158cfee18d8 /libavfilter/avfilter.h
parentf85746509ca8b727d97ff801a63a22f81fd27a0c (diff)
lavfi: use a new field for automatic buffer copy.
The code currently use cur_buf as the target of the copy, but cur_buf can be cleared by the filter if it has given the reference away or stored it elsewhere as soon as start_frame. The code still relies on the fact that the reference is not destroyed until end_frame. All filters currently follow that condition. An av_assert1() is added to check it; it should at least cause very visible errors in valgrind.
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 68373fdd6e..0e7111d53b 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -669,6 +669,15 @@ struct AVFilterLink {
* called with more samples, it will split them.
*/
int max_samples;
+
+ /**
+ * The buffer reference currently being received across the link by the
+ * destination filter. This is used internally by the filter system to
+ * allow automatic copying of buffers which do not have sufficient
+ * permissions for the destination. This should not be accessed directly
+ * by the filters.
+ */
+ AVFilterBufferRef *cur_buf_copy;
};
/**