interlace: fix negotiation for true interlaced modes
authorDavid Schleef <ds@schleef.org>
Wed, 6 Feb 2013 23:48:06 +0000 (15:48 -0800)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 7 Feb 2013 12:04:46 +0000 (12:04 +0000)
gst/interlace/gstinterlace.c

index 6e0fcdb5d1f0aff4f1684ddb39aba945ac063b9d..ee49518065d578ed11c368823804792593b207ee 100644 (file)
@@ -471,6 +471,7 @@ gst_interlace_getcaps (GstPad * pad, GstInterlace * interlace, GstCaps * filter)
   GstPad *otherpad;
   GstCaps *othercaps, *tcaps;
   GstCaps *icaps;
+  const char *mode;
 
   otherpad =
       (pad == interlace->srcpad) ? interlace->sinkpad : interlace->srcpad;
@@ -492,8 +493,13 @@ gst_interlace_getcaps (GstPad * pad, GstInterlace * interlace, GstCaps * filter)
   }
 
   icaps = gst_caps_make_writable (icaps);
+  if (interlace->pattern > GST_INTERLACE_PATTERN_2_2) {
+    mode = "mixed";
+  } else {
+    mode = "interleaved";
+  }
   gst_caps_set_simple (icaps, "interlace-mode", G_TYPE_STRING,
-      pad == interlace->srcpad ? "mixed" : "progressive", NULL);
+      pad == interlace->srcpad ? mode : "progressive", NULL);
 
   gst_caps_unref (tcaps);