Skip to content

parse: fix parsing arrays in caps for "implicit" capsfilters

Mathieu Duponchelle requested to merge meh/gstreamer:parse-fix-array into main

When using such a launch line:

fakesrc ! "audio/x-opus, channel-mapping=(int)<0, 1>" ! fakesink

the caps string, with spaces escaped but no quotes gets passed to gst_caps_from_string(), which then fails to parse the array because it contains spaces.

When using an explicit capsfilter instead:

fakesrc ! capsfilter caps="audio/x-opus, channel-mapping=(int)<0, 1>" ! fakesink

the caps string, with spaces escaped and quotes gets passed through gst_value_deserialize, which first calls gst_str_unwrap() on it and only then gst_caps_from_string() on the result.

This fixes the inconsistency by using a custom version of str_unwrap() in the parser, which doesn't expect a quoted string.

Merge request reports