basetransform: Return GST_FLOW_ERROR if the allocator did not allow to allocate a...
authorSebastian Dröge <slomo@circular-chaos.org>
Fri, 24 May 2013 12:37:19 +0000 (14:37 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Fri, 24 May 2013 12:37:37 +0000 (14:37 +0200)
libs/gst/base/gstbasetransform.c

index f143970..abdb064 100644 (file)
@@ -1592,6 +1592,10 @@ default_prepare_output_buffer (GstBaseTransform * trans,
 
   GST_DEBUG_OBJECT (trans, "doing alloc of size %" G_GSIZE_FORMAT, outsize);
   *outbuf = gst_buffer_new_allocate (priv->allocator, outsize, &priv->params);
+  if (!*outbuf) {
+    ret = GST_FLOW_ERROR;
+    goto alloc_failed;
+  }
 
 copy_meta:
   /* copy the metadata */