mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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:
parent
463ccd96eb
commit
59749833bb
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue