mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
allocator: make a copy with the same alignment
When making a copy of the memory allocated from the default memory allocator, make sure the new copy has the same alignment as the original memory. See https://bugzilla.gnome.org/show_bug.cgi?id=680796
This commit is contained in:
parent
b94e46b8b4
commit
0e4d2814fd
1 changed files with 2 additions and 2 deletions
|
@ -453,8 +453,8 @@ _default_mem_copy (GstMemoryDefault * mem, gssize offset, gsize size)
|
||||||
size = mem->mem.size > offset ? mem->mem.size - offset : 0;
|
size = mem->mem.size > offset ? mem->mem.size - offset : 0;
|
||||||
|
|
||||||
copy =
|
copy =
|
||||||
_default_mem_new_block (0, mem->mem.maxsize, 0, mem->mem.offset + offset,
|
_default_mem_new_block (0, mem->mem.maxsize, mem->mem.align,
|
||||||
size);
|
mem->mem.offset + offset, size);
|
||||||
GST_CAT_DEBUG (GST_CAT_PERFORMANCE,
|
GST_CAT_DEBUG (GST_CAT_PERFORMANCE,
|
||||||
"memcpy %" G_GSIZE_FORMAT " memory %p -> %p", mem->mem.maxsize, mem,
|
"memcpy %" G_GSIZE_FORMAT " memory %p -> %p", mem->mem.maxsize, mem,
|
||||||
copy);
|
copy);
|
||||||
|
|
Loading…
Reference in a new issue