From cb789617f976a9b2f65362eb92a3b98215e5d053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 26 Apr 2010 17:25:38 +0200 Subject: [PATCH] deinterlace: Properly set interlaced field in getcaps --- gst/deinterlace/gstdeinterlace.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index b9023a1599..ee8d94c6eb 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -1183,9 +1183,15 @@ gst_deinterlace_getcaps (GstPad * pad) GST_OBJECT_UNLOCK (self); - if (!self->passthrough && self->fields == GST_DEINTERLACE_ALL) { - for (len = gst_caps_get_size (ret); len > 0; len--) { - GstStructure *s = gst_caps_get_structure (ret, len - 1); + for (len = gst_caps_get_size (ret); len > 0; len--) { + GstStructure *s = gst_caps_get_structure (ret, len - 1); + + if (pad == self->sinkpad || self->passthrough) + gst_structure_remove_field (s, "interlaced"); + else + gst_structure_set (s, "interlaced", G_TYPE_BOOLEAN, FALSE, NULL); + + if (!self->passthrough && self->fields == GST_DEINTERLACE_ALL) { const GValue *val; val = gst_structure_get_value (s, "framerate");