diff options
author | Seungha Yang <seungha@centricular.com> | 2021-05-26 00:23:56 +0900 |
---|---|---|
committer | Seungha Yang <seungha@centricular.com> | 2021-05-27 12:58:30 +0000 |
commit | 80567ca939c535ed6083770a1f37743d60ba11b3 (patch) | |
tree | c4205a0e0ecd22c15ebf5df55c53c062310020b0 /gst | |
parent | 9a8aea4a6a786065cf403cc79a89201e5e4ca490 (diff) |
deinterlace: Drop "field-order" field while transforming caps
Like other basetransform subclasses are doing, drop field
which can be converted by deinterlace.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/997>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/deinterlace/gstdeinterlace.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 750e68f96..3fba2d2b2 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -2539,11 +2539,18 @@ gst_deinterlace_getcaps (GstDeinterlace * self, GstPad * pad, GstCaps * filter) for (len = gst_caps_get_size (tmp2); len > 0; len--) { GstStructure *s = gst_caps_get_structure (tmp2, len - 1); - if (pad == self->sinkpad) + /* Drop fields which can be converted by us. + * Specifically "field-order" here. + * "field-order" with "progressive" and/or + * unspecified "interlace-mode" would cause negotiation issue */ + gst_structure_remove_field (s, "field-order"); + + if (pad == self->sinkpad) { gst_structure_remove_field (s, "interlace-mode"); - else + } else { gst_structure_set (s, "interlace-mode", G_TYPE_STRING, "progressive", NULL); + } } if (self->user_set_fields == GST_DEINTERLACE_ALL) { |