mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +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
e5ac798c7b
commit
57e3797e88
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