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.
This commit is contained in:
Sebastian Dröge 2013-03-21 13:29:06 +01:00
parent d06c332655
commit 23c1a08bce

View file

@ -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;