summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@collabora.co.uk>2014-06-24 19:23:01 +0100
committerJulien Isorce <julien.isorce@collabora.co.uk>2014-06-25 06:56:25 +0100
commit045aa4ee7ec58450db4b0cfd8153fafcc4d456d3 (patch)
tree55601bc54e68ea7e742a8cf3a50876a22b02717a
parent6f45d00a9b065e4baa15aee9d79f2eb2b0df92d9 (diff)
downloadgstreamer-plugins-bad-045aa4ee7ec58450db4b0cfd8153fafcc4d456d3.tar.gz
glfilter: prepend intersection to src caps
Prefer to stay in the same memory space if possible. Also it let a chance to do passthrough. See https://bugzilla.gnome.org/show_bug.cgi?id=732178
-rw-r--r--gst-libs/gst/gl/gstglfilter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
index 250ae39ee..c0c79f3b1 100644
--- a/gst-libs/gst/gl/gstglfilter.c
+++ b/gst-libs/gst/gl/gstglfilter.c
@@ -757,6 +757,12 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt,
result = tmp;
}
+ /* if output still intersects input then prefer the intersection */
+ if (direction == GST_PAD_SINK) {
+ 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);
return result;