summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-06-10 13:40:57 +0200
committerTim-Philipp Müller <tim@centricular.net>2012-09-11 01:54:41 +0100
commit615063ba5e025998700cfeb53b0d55a2fb9cfe90 (patch)
tree0241cc0f51a85dd0b90142812269cd3f24a12494
parent1136224e91d5701bf28e30d34dd3c3a221274b94 (diff)
gdp: make new _buffer_allocate method
Make a new method to allocate a buffer + memory that takes the allocator and the alignment as parameters. Provide a macro for the old method but prefer to use the new method to encourage plugins to negotiate the allocator properly.
-rw-r--r--gst/gdp/dataprotocol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c
index 8b32bb806..e924ea5ed 100644
--- a/gst/gdp/dataprotocol.c
+++ b/gst/gdp/dataprotocol.c
@@ -461,7 +461,8 @@ gst_dp_buffer_from_header (guint header_length, const guint8 * header)
GST_DP_PAYLOAD_BUFFER, NULL);
buffer =
- gst_buffer_new_and_alloc ((guint) GST_DP_HEADER_PAYLOAD_LENGTH (header));
+ gst_buffer_new_allocate (NULL,
+ (guint) GST_DP_HEADER_PAYLOAD_LENGTH (header), 0);
GST_BUFFER_TIMESTAMP (buffer) = GST_DP_HEADER_TIMESTAMP (header);
GST_BUFFER_DURATION (buffer) = GST_DP_HEADER_DURATION (header);