ximagesink = GST_XIMAGESINK (vsink);
+ /* This shouldn't really happen because state changes will fail
+ * if the xcontext can't be allocated */
+ if (!ximagesink->xcontext)
+ return GST_FLOW_ERROR;
+
/* If this buffer has been allocated using our buffer management we simply
put the ximage which is in the PRIVATE pointer */
if (GST_IS_XIMAGE_BUFFER (buf)) {
ximagesink = GST_XIMAGESINK (bsink);
+ /* This shouldn't really happen because state changes will fail
+ * if the xcontext can't be allocated */
+ if (!ximagesink->xcontext)
+ return GST_FLOW_ERROR;
+
GST_LOG_OBJECT (ximagesink,
"a buffer of %d bytes was requested with caps %" GST_PTR_FORMAT
" and offset %" G_GUINT64_FORMAT, size, caps, offset);