memory: Add 0 padding
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 14 Mar 2012 20:32:22 +0000 (21:32 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 14 Mar 2012 20:32:22 +0000 (21:32 +0100)
commitedd2ffe4d4caef2247e7f2376c5309f07b26ac02
tree7e46881b4d2dc8b6aaf199a51c444585a3b9e1dd
parent3d76e6011c9c4c788d25d4bd629f4c9b1143e554
memory: Add 0 padding

Change gst_allocator_alloc() so that we can also spicify flags and padding.
Add 2 new flags to mark the memory 0 prefixed/padded. This allows us to
remove some resizes in the base classes.
When allocating memory, memset prefix and padding with 0 when the flags tell
us to.
On resize, clear the zero padding flags if we can't guarantee the memory is
still 0 filled.
Update tests.
gst/gstbuffer.c
gst/gstbufferpool.c
gst/gstmemory.c
gst/gstmemory.h
libs/gst/base/gstbasesrc.c
libs/gst/base/gstbasetransform.c
tests/check/gst/gstbuffer.c
tests/check/gst/gstmemory.c