After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590667 - caps parsing regressions.
caps parsing regressions.
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.24
Other Linux
: Normal blocker
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-03 18:00 UTC by Wim Taymans
Modified: 2009-08-04 13:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
possible patch (751 bytes, patch)
2009-08-03 18:13 UTC, Wim Taymans
none Details | Review

Description Wim Taymans 2009-08-03 18:00:34 UTC
The following pipeline used to work fine but is broken in git:

gst-launch udpsrc caps="application/x-rtp, sprop-parameter-sets=(string)\"Z01AFZJUCg/YCIAAAAMAgAAAHkeLF1A\\=\\,aO48gA\\=\\=\"" ! fakesink

The problem seems to be that due to (likely?) more escaping, the = character is not considered to be an ASCII character in gst_string_unwrap() and then it fails to parse.
Comment 1 Wim Taymans 2009-08-03 18:13:16 UTC
Created attachment 139806 [details] [review]
possible patch

An ugly ad-hoc patch
Comment 2 Jan Schmidt 2009-08-03 19:03:57 UTC
Not sure what to do with this one.

On the one hand, the patch seems acceptable in the interests of backwards-compatibility. On the other hand, serialising that caps 'correctly' (or calling gst_caps_to_string) would produce "application/x-rtp, sprop-parameter-sets=(string)"Z01AFZJUCg/YCIAAAAMAgAAAHkeLF1A\=\,aO48gA\=\=" with the = signs escaped as well...

I think we should put the patch in...
Comment 3 Wim Taymans 2009-08-03 19:22:39 UTC
I think it used to escape all inside the first string (and second string) and then when parsing the second string, if would correctly escape the = because it was escaped twice. With current git it somehow manages to escape too much.

I think the rules would be something like this:

foo=   ->  "foo\="
a b"foo\="=  ->  "a\ b\"foo\=\"\=", don't escape inside string, count open/close
                            quotes

and back:

"a\ b\"foo\=\"\=" -> unescape, don't go inside nested string, ie, count open and
                     close "


Comment 4 Wim Taymans 2009-08-04 10:24:04 UTC
strangely, this works:

gst-launch udpsrc caps='application/x-rtp,
sprop-parameter-sets=(string)\"Z01AFZJUCg/YCIAAAAMAgAAAHkeLF1A\\=\\,aO48gA\\=\\=\"' ! fakesink

It seems that the terminal is escaping some more.

Comment 5 Wim Taymans 2009-08-04 11:19:40 UTC
after bisect: 7bf3554228f52e06e465fc02d31ac4b1b267ff7d structure: Change NULL and empty string handling changed behaviour.
Comment 6 Wim Taymans 2009-08-04 11:40:41 UTC
It's because the " of the string are kept as long as possible to detect NULL and "NULL" this causes extra unwrap which then fails because the shell unescaped the strings.

I would say this is not a bug then, one has to use the ' on the shell.
Comment 7 Jan Schmidt 2009-08-04 13:47:43 UTC
OK, let's close it then