bayer: Intersect transformed caps with filter
authorOlivier Crête <olivier.crete@collabora.com>
Wed, 25 Jan 2012 15:57:52 +0000 (16:57 +0100)
committerOlivier Crête <olivier.crete@collabora.com>
Wed, 25 Jan 2012 17:04:55 +0000 (18:04 +0100)
gst/bayer/gstrgb2bayer.c

index 9213e5e1d0f7e863b82423f5fced1292d7fc8aa5..4f2fc7b8357cb8da38dc54d2500850306962d3b5 100644 (file)
@@ -154,6 +154,12 @@ gst_rgb2bayer_transform_caps (GstBaseTransform * trans,
   GST_DEBUG_OBJECT (trans, "transforming caps (into) %" GST_PTR_FORMAT,
       newcaps);
 
+  if (filter) {
+    GstCaps *tmpcaps = newcaps;
+    newcaps = gst_caps_intersect (newcaps, filter);
+    gst_caps_unref (tmpcaps);
+  }
+
   return newcaps;
 }