diff --git a/sys/v4l2/gstv4l2transform.c b/sys/v4l2/gstv4l2transform.c index 2e29f10076..f9a1d920ec 100644 --- a/sys/v4l2/gstv4l2transform.c +++ b/sys/v4l2/gstv4l2transform.c @@ -428,6 +428,17 @@ gst_v4l2_transform_fixate_caps (GstBaseTransform * trans, ins = gst_caps_get_structure (caps, 0); outs = gst_caps_get_structure (othercaps, 0); + { + const gchar *in_format; + + in_format = gst_structure_get_string (ins, "format"); + if (in_format) { + /* Try to set output format for pass through */ + gst_structure_fixate_field_string (outs, "format", in_format); + } + + } + from_par = gst_structure_get_value (ins, "pixel-aspect-ratio"); to_par = gst_structure_get_value (outs, "pixel-aspect-ratio"); @@ -847,6 +858,9 @@ done: if (to_par == &tpar) g_value_unset (&tpar); + /* fixate remaining fields */ + othercaps = gst_caps_fixate (othercaps); + return othercaps; }