From 65927acc455fc2b5422f2dde6db5cbfcafeafc2b Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 6 Feb 2013 15:48:06 -0800 Subject: [PATCH] interlace: fix negotiation for true interlaced modes --- gst/interlace/gstinterlace.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/interlace/gstinterlace.c b/gst/interlace/gstinterlace.c index 81251a03b0..2e35008a89 100644 --- a/gst/interlace/gstinterlace.c +++ b/gst/interlace/gstinterlace.c @@ -499,6 +499,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; @@ -520,8 +521,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);