mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
buffer: implement COPY_MERGE
This commit is contained in:
parent
4e32ac8463
commit
edbfc492bb
1 changed files with 6 additions and 0 deletions
|
@ -169,6 +169,9 @@ _span_memory (GstBuffer * buffer, gsize offset, gsize size)
|
|||
/* not enough room, span buffers */
|
||||
mem[0] = GST_BUFFER_MEM_ARRAY (buffer);
|
||||
len[0] = GST_BUFFER_MEM_LEN (buffer);
|
||||
if (len[0] == 1)
|
||||
return;
|
||||
|
||||
span = _gst_buffer_arr_span (mem, len, 1, offset, size);
|
||||
|
||||
/* unref old buffers */
|
||||
|
@ -324,6 +327,9 @@ gst_buffer_copy_into (GstBuffer * dest, GstBuffer * src,
|
|||
left -= tocopy;
|
||||
}
|
||||
}
|
||||
if (flags & GST_BUFFER_COPY_MERGE) {
|
||||
_span_memory (dest, 0, size);
|
||||
}
|
||||
}
|
||||
|
||||
for (walk = GST_BUFFER_META (src); walk; walk = walk->next) {
|
||||
|
|
Loading…
Reference in a new issue