GNOME Bugzilla – Bug 771434
ges-launch cannot not load files with square brackets in the file name
Last modified: 2016-09-30 07:05:26 UTC
Hi, as reported in the subject ges-launch cannot not load files with square brackets in the file name. This works: $ gst-launch-1.0 videotestsrc num-buffers=100 ! jpegenc ! avimux ! filesink location=test.mjpeg $ ges-launch-1.0 +clip test.mjpg <position: 0:00:03.267418000 duration: 0:00:03.333333334/>> Done This does not: $ gst-launch-1.0 videotestsrc num-buffers=100 ! jpegenc ! avimux ! filesink location=test\[2\].mjpeg $ ges-launch-1.0 +clip test\[2\].mjpeg ERROR: Could not create timeline because: Could not find a suitable formatter Thanks, Antonio
Created attachment 335536 [details] [review] structure-parser: Make sure to quote object identifiers Otherwise the GstStructure might fail on some chars (for example a filename with brackets fails).
Review of attachment 335536 [details] [review]: ::: ges/ges-structure-parser.c @@ -120,3 +124,3 @@ symbol++; self->add_comma = FALSE; set self->add_quote = TRUE here @@ -123,8 +127,14 @@ - if (!g_ascii_strncasecmp (symbol, "clip", 4)) - ges_structure_parser_parse_string (self, "clip, uri=", TRUE); - else if (!g_ascii_strncasecmp (symbol, "test-clip", 9)) ... 5 more ... + if (!g_ascii_strncasecmp (symbol, "clip", 4)) { + self->add_quote = TRUE; + ges_structure_parser_parse_string (self, "clip, uri=\"", TRUE); ... 11 more ... and set it to FALSE in an else clause there ;)
Created attachment 335562 [details] [review] ges-launch: Be a bit more agressive sanatizing arguments
Created attachment 335563 [details] [review] ges-launch: Be a bit more agressive sanitizing arguments Otherwise GstStructure might fail parsing some fields containing brackets
Created attachment 335572 [details] [review] ges-launch: Be a bit more agressive sanitizing arguments Otherwise GstStructure might fail parsing some fields containing brackets
Review of attachment 335572 [details] [review]: Accepted
Review of attachment 335572 [details] [review]: will break with "uri=that_breaks"
Attachment 335572 [details] pushed as 244266a - ges-launch: Be a bit more agressive sanitizing arguments