bufferpool: use same alignment values as GstMemory

Use the same alignment values for the bufferpool as we use for the GstMemory
API.
This commit is contained in:
Wim Taymans 2011-06-10 17:50:27 +02:00
parent 94ae04f098
commit 2b071ea395

View file

@ -160,15 +160,12 @@ static GstFlowReturn
default_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer, default_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer,
GstBufferPoolParams * params) GstBufferPoolParams * params)
{ {
guint align;
GstBufferPoolPrivate *priv = pool->priv; GstBufferPoolPrivate *priv = pool->priv;
*buffer = gst_buffer_new (); *buffer = gst_buffer_new ();
align = priv->align - 1;
gst_buffer_take_memory (*buffer, gst_memory_allocator_alloc (NULL, priv->size, gst_buffer_take_memory (*buffer, gst_memory_allocator_alloc (NULL, priv->size,
align)); priv->align));
return GST_FLOW_OK; return GST_FLOW_OK;
} }