mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 06:52:41 +00:00
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:
parent
62507bb089
commit
81c38c1d2b
1 changed files with 9 additions and 7 deletions
|
@ -774,14 +774,16 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt,
|
||||||
result = tmp;
|
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);
|
f = gst_caps_get_features (caps, 0);
|
||||||
|
/* if output still intersects input then prefer the intersection */
|
||||||
|
|
||||||
if (!gst_caps_features_is_any (f)
|
if (!gst_caps_features_is_any (f)
|
||||||
&& !gst_caps_features_is_equal (f,
|
&& !gst_caps_features_is_equal (f,
|
||||||
GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) {
|
GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) {
|
||||||
tmp = gst_caps_intersect_full (result, caps, GST_CAPS_INTERSECT_FIRST);
|
tmp = gst_caps_intersect_full (result, caps, GST_CAPS_INTERSECT_FIRST);
|
||||||
result = gst_caps_merge (tmp, result);
|
result = gst_caps_merge (tmp, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (bt, "returning caps: %" GST_PTR_FORMAT, result);
|
GST_DEBUG_OBJECT (bt, "returning caps: %" GST_PTR_FORMAT, result);
|
||||||
|
|
Loading…
Reference in a new issue