deinterlace: Remove the interlaced field from the output caps if deinterlacing is...
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 23 Jun 2009 15:51:32 +0000 (17:51 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 23 Jun 2009 15:52:29 +0000 (17:52 +0200)
gst/deinterlace/gstdeinterlace.c

index 9a90e40..55e6f7f 100644 (file)
@@ -1511,6 +1511,14 @@ gst_deinterlace_setcaps (GstPad * pad, GstCaps * caps)
     othercaps = gst_caps_ref (caps);
   }
 
+  if (otherpad == self->srcpad && self->mode != GST_DEINTERLACE_MODE_DISABLED) {
+    GstStructure *s;
+
+    othercaps = gst_caps_make_writable (othercaps);
+    s = gst_caps_get_structure (othercaps, 0);
+    gst_structure_remove_field (s, "interlaced");
+  }
+
   if (!gst_pad_set_caps (otherpad, othercaps))
     goto caps_not_accepted;