projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
463ccd9
)
bufferpool: Add missing error checking to default_alloc_buffer()
author
Mohammed Sameer
<msameer@foolab.org>
Wed, 30 Jul 2014 12:46:22 +0000
(15:46 +0300)
committer
Nicolas Dufresne
<nicolas.dufresne@collabora.co.uk>
Wed, 30 Jul 2014 13:02:20 +0000
(09:02 -0400)
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
gst/gstbufferpool.c
patch
|
blob
|
history
diff --git
a/gst/gstbufferpool.c
b/gst/gstbufferpool.c
index 6509225b92a3943c99424396f88879ec3c49ff03..5cd5ddc18846d9d81b7d5f7069ab3cc91f5eb22d 100644
(file)
--- a/
gst/gstbufferpool.c
+++ b/
gst/gstbufferpool.c
@@
-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;
}