From bc11a6fd17fd55a0542cbe7d92c9d3d9c24f3760 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 10 Jun 2011 13:40:57 +0200 Subject: [PATCH] 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. --- gst/gdp/dataprotocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c index 8b32bb8..e924ea5 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); -- 2.7.4