mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
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.
This commit is contained in:
parent
7c7920e0e2
commit
bc11a6fd17
1 changed files with 2 additions and 1 deletions
|
@ -461,7 +461,8 @@ gst_dp_buffer_from_header (guint header_length, const guint8 * header)
|
||||||
GST_DP_PAYLOAD_BUFFER, NULL);
|
GST_DP_PAYLOAD_BUFFER, NULL);
|
||||||
|
|
||||||
buffer =
|
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_TIMESTAMP (buffer) = GST_DP_HEADER_TIMESTAMP (header);
|
||||||
GST_BUFFER_DURATION (buffer) = GST_DP_HEADER_DURATION (header);
|
GST_BUFFER_DURATION (buffer) = GST_DP_HEADER_DURATION (header);
|
||||||
|
|
Loading…
Reference in a new issue