bufferpool: Add missing error checking to default_alloc_buffer()

default_alloc_buffer() calls gst_buffer_new_allocate() but does not check for
failed allocation.

This patch makes default_alloc_buffer() return an error (GST_FLOW_ERROR) if
buffer allocation fails.

https://bugzilla.gnome.org/show_bug.cgi?id=733974
This commit is contained in:
Mohammed Sameer 2014-07-30 15:46:22 +03:00 committed by Nicolas Dufresne
parent 463ccd96eb
commit 59749833bb

View file

@ -227,6 +227,9 @@ default_alloc_buffer (GstBufferPool * pool, GstBuffer ** buffer,
*buffer =
gst_buffer_new_allocate (priv->allocator, priv->size, &priv->params);
if (!*buffer)
return GST_FLOW_ERROR;
return GST_FLOW_OK;
}