From f9e01a53d8df4c4d3a6782e55ab7d11b480ff368 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 6 Jun 2016 17:54:10 -0400 Subject: [PATCH] v4l2transform: Use looser caps for upstream When we fixate for upstream, try to not introduce new fields when not needed. This was imported from videoconvert element. --- sys/v4l2/gstv4l2transform.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/v4l2/gstv4l2transform.c b/sys/v4l2/gstv4l2transform.c index f9a1d920ec..864b64f52c 100644 --- a/sys/v4l2/gstv4l2transform.c +++ b/sys/v4l2/gstv4l2transform.c @@ -861,6 +861,12 @@ done: /* fixate remaining fields */ othercaps = gst_caps_fixate (othercaps); + if (direction == GST_PAD_SINK) { + if (gst_caps_is_subset (caps, othercaps)) { + gst_caps_replace (&othercaps, caps); + } + } + return othercaps; }