glfilter: silence a warning with empty input caps

discovered with the doublecube example

gst_caps_get_features: assertion 'index < GST_CAPS_LEN (caps)' failed
This commit is contained in:
Matthew Waters 2014-09-28 21:18:32 +10:00 committed by Tim-Philipp Müller
parent b2df178d41
commit 80be2d046b

View file

@ -774,8 +774,9 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt,
result = tmp;
}
/* if output still intersects input then prefer the intersection */
if (gst_caps_get_size (caps) > 0) {
f = gst_caps_get_features (caps, 0);
/* if output still intersects input then prefer the intersection */
if (!gst_caps_features_is_any (f)
&& !gst_caps_features_is_equal (f,
@ -783,6 +784,7 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt,
tmp = gst_caps_intersect_full (result, caps, GST_CAPS_INTERSECT_FIRST);
result = gst_caps_merge (tmp, result);
}
}
GST_DEBUG_OBJECT (bt, "returning caps: %" GST_PTR_FORMAT, result);