From 3e515099ec3026d539d1149e4861db912eadc9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 24 May 2013 14:37:19 +0200 Subject: [PATCH] basetransform: Return GST_FLOW_ERROR if the allocator did not allow to allocate a buffer --- libs/gst/base/gstbasetransform.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index f143970477..abdb0644bc 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -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 */