From 0e4d2814fdc8b4370749af107a08c25466427440 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 20 Aug 2012 11:31:51 +0200 Subject: [PATCH] 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 --- gst/gstallocator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/gstallocator.c b/gst/gstallocator.c index 2fbb2ed..df5b04f 100644 --- a/gst/gstallocator.c +++ b/gst/gstallocator.c @@ -453,8 +453,8 @@ _default_mem_copy (GstMemoryDefault * mem, gssize offset, gsize size) size = mem->mem.size > offset ? mem->mem.size - offset : 0; copy = - _default_mem_new_block (0, mem->mem.maxsize, 0, mem->mem.offset + offset, - size); + _default_mem_new_block (0, mem->mem.maxsize, mem->mem.align, + mem->mem.offset + offset, size); GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "memcpy %" G_GSIZE_FORMAT " memory %p -> %p", mem->mem.maxsize, mem, copy); -- 2.7.4