From 23c1a08bcec6f3439b7da42a05479929620bda8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 21 Mar 2013 13:29:06 +0100 Subject: [PATCH] ximagesink: Don't access structures of EMPTY caps If the intersection between our caps and the filter caps is empty, just immediately return EMPTY caps instead of trying to access the (non-existant) structures. --- sys/ximage/ximagesink.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index c036f96623..aaf7223d6e 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -1009,6 +1009,11 @@ gst_ximagesink_getcaps (GstBaseSink * bsink, GstCaps * filter) caps = intersection; } + if (gst_caps_is_empty (caps)) { + g_mutex_unlock (&ximagesink->x_lock); + return caps; + } + if (ximagesink->xwindow && ximagesink->xwindow->width) { GstStructure *s0, *s1;