GNOME Bugzilla – Bug 797146
uri: fix roundtrip for file:// URIs
Last modified: 2018-11-03 12:48:14 UTC
Created attachment 373661 [details] [review] uri: fix roundtrip for file:// uris uri = gst_uri_from_string ("file:///path/to/foo.bar"); string = gst_uri_to_string (uri); would return "file:/path/to/foo.bar". Slashes get lost somewhere. Setting the hostname to "" after gst_uri_from_string() "fixes" it. Attached patch fixes it also without making any of the other unit tests fail, but it's pretty much cargo-culted without real understanding. Question is if this is something that needs to be fixed serialisation-side or parsing-side I guess.
Review of attachment 373661 [details] [review]: ::: gst/gsturi.c @@ +1958,3 @@ + uri->port != GST_URI_NO_PORT) || (uri->userinfo == NULL + && uri->host == NULL && uri->port == GST_URI_NO_PORT + && uri->scheme != NULL)) From your fix it seems like a problem on the serialization side. The fields of the URI are all set correctly when parsing file URIs it seems? Just unclear if these are *all* the cases where a // should be appended at this position, and if this is not causing too many // to be added. E.g. "whateverscheme:someid" would also cause // to be added or not, or would parsing put "someid" into the userinfo then?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/312.