Improper treatment of percent escaped characters by gstsouphttpsrc
Mateusz Kowalczyk
mk440 at bath.ac.uk
Thu Nov 22 13:20:21 PST 2012
Greetings,
I'm a Clementine (Qt based music player, a fork of Amarok) user which
uses GStreamer as it's engine.
Today a user file a bug report about his .xpfs file not being properly
played. In it, he has a URL pointed at some location on the Internet.
The issue occurs when the URL has percent-escaped characters. In this
case they happen to be ‘%5B’ and ‘%5D’ which stand for ‘[’ and ‘]’
respectively.
Now, there are some things I'd like to establish.
1. Clementine (or rather GStreamer) handles streams just fine.
2. The user interface and the whole back-end IS parsing the .xpfs fine,
extracting the string as expected.
3. The string being passed to a GStreamer pipeline is still the same
string, before the audio starts playing and after it stops.
Here's a small Clementine debug output. It contains a few more messages
than it usually does as I spent quite a few hours ensuring that
Clementine actually handles the URL properly and passes it to GStreamer
as expected.
Url at start of Load "http://www.notarealurl.net/insub/%5Binsub05%5DJacques_Demierre-1-black_white_memories.mp3"
Url after Engine::Base::Load "http://www.notarealurl.net/insub/%5Binsub05%5DJacques_Demierre-1-black_white_memories.mp3"
gst_url QUrl( "http://www.notarealurl.net/insub/%5Binsub05%5DJacques_Demierre-1-black_white_memories.mp3" )
About to create a pipeline from gst_url
Creating pipeline in GstEngine using CreatePipeline(url, nanosec)
url is QUrl( "http://www.notarealurl.net/insub/%5Binsub05%5DJacques_Demierre-1-black_white_memories.mp3" )
Calling InitFromUrl with url: QUrl( "http://www.notarealurl.net/insub/%5Binsub05%5DJacques_Demierre-1-black_white_memories.mp3" )
Managed to make a pipeline
Before BufferingFinished()
After BufferingFinished()
Done with pipeline creation; return true;
In Play
Setting QFuture
Leaving Play
position 0 scrobble point 31 status 0
1 "gstsouphttpsrc.c(1117): gst_soup_http_src_parse_status (): /GstPipeline:pipeline/GstURIDecodeBin:uridecodebin-0/GstSoupHTTPSrc:source:
Not Found (404), URL: http://www.notarealurl.net/insub/%255Binsub05%255DJacques_Demierre-1-black_white_memories.mp3"
Gstreamer error: "Not Found"
QTimeLine::start: already running
Stopping; old url_ is QUrl( "http://www.notarealurl.net/insub/%5Binsub05%5DJacques_Demierre-1-black_white_memories.mp3" )
As can be seen above, I make sure a couple of times that the URL I have
is correct. Once GStreamer tries to reach it however, it reports a 404
error with a mangled URL (number 25 seems to be inserted for some
reason; I haven't tried with other escape codes).
Is there something fundamental I'm missing? Is that plug-in not supposed
to be able to handle such URLs?
I tried looking for the source of the mentioned file to check if it's
doing anything funky, but the GStreamer repos were quite difficult to
navigate.
I thought that I should ask on a mailing list before filing a bug report
as there really might be something simple I fail to notice as I'm not
familiar with GStreamer. If someone is able to stream such a URL, might
have to go back and spend more time on the Clementine side of things,
although I'm pretty confident that it's not the culprit here.
Thank you.
More information about the gstreamer-devel
mailing list