Commit 75c337c7 authored by Sebastian Dröge's avatar Sebastian Dröge

x(v)imagesink: If NULL caps are passed to buffer_alloc() do fallback allocation

Fixes bug #647857.
parent 37b38780
......@@ -1779,6 +1779,13 @@ gst_ximagesink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
ximagesink = GST_XIMAGESINK (bsink);
if (G_UNLIKELY (!caps)) {
GST_WARNING_OBJECT (ximagesink, "have no caps, doing fallback allocation");
*buf = NULL;
ret = GST_FLOW_OK;
goto beach;
}
/* This shouldn't really happen because state changes will fail
* if the xcontext can't be allocated */
if (!ximagesink->xcontext)
......
......@@ -2508,6 +2508,9 @@ gst_xvimagesink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
xvimagesink = GST_XVIMAGESINK (bsink);
if (G_UNLIKELY (!caps))
goto no_caps;
g_mutex_lock (xvimagesink->pool_lock);
if (G_UNLIKELY (xvimagesink->pool_invalid))
goto invalid;
......@@ -2701,6 +2704,13 @@ invalid_caps:
g_mutex_unlock (xvimagesink->pool_lock);
goto beach;
}
no_caps:
{
GST_WARNING_OBJECT (xvimagesink, "have no caps, doing fallback allocation");
*buf = NULL;
ret = GST_FLOW_OK;
goto beach;
}
}
/* Interfaces stuff */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment