GNOME Bugzilla – Bug 632977
[queue2] qtdemux causes soup to request seeks past the end of the range
Last modified: 2010-12-02 18:26:19 UTC
Running: totem 'http://trailers.apple.com/movies/independent/thegirlwhokickedthehornetsnest/girlwhokickedthehornetsnest-tlr1_480p.mov' Results in souphttpsrc throwing a seek error: ``Server does not support seeking.'' This turns out to be caused by a seek past the end of the content (as reported by the Content-Length header in http headers). Looking more closely it seems the simplified pipeline looks like this: souphttpsrc ! queue2 ! qtdemux qtdemux loops over all state headers untill gst_pad_pull_range returns UNEXPECTED, queue2 seems to transform get_range calls into seeks on its source pipeline. Which causes qtdemux to trigger a seek to paste the end of the file, causing it all to go horribly wrong :/
Marking as blocker for now. Would be nice if we could fix this or at least work around this for the release (but where? queue2? qtdemux? souphttpsrc? all of them?)
Created attachment 173600 [details] [review] souphttpsrc: Don't send seeks behind the end of file to the server Also improve debug output, re-initialize the content size and let the seek handler error out on invalid seek segments. Fixes bug #632977.
Tim also has a patch for queue2 to prevent seeks going to the source ;) But after fixing the seek problem there's still a problem with this stream somewhere. Buffers are going to ffmpegcolorspace/audioconvert without any caps being negotiated yet.
Ok, that happens because the EOS event is not dropped by queue2 although it should. Shouldn't be a problem anymore with Tim's patch ;)
No, ignore the last comment. qtdemux sends EOS because queue2 return UNEXPECTED. It's all good
Created attachment 173604 [details] [review] queue2: don't send seeks beyond the end of the file upstream in pull mode If downstream is operating in pull mode, short-circuit any pulls beyond the end of the file and return FLOW_UNEXPECTED immediately instead of sending a seek beyond the end of the file upstream, since this might confuse upstream elements (and/or http servers, for example). Fixes playback of apple trailers in totem.
The queue2 patch also fixes youtube/html5 playback in WebkitGTK+, thanks for hunting this one down :)
Just pushed this for now: commit ce35fb79da5f6cdd231ebd2855b04037fb7d959a Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Sun Oct 31 19:47:25 2010 +0000 queue2: don't send seeks beyond the end of the file upstream in pull mode If downstream is operating in pull mode, short-circuit any pulls beyond the end of the file and return FLOW_UNEXPECTED immediately instead of sending a seek beyond the end of the file upstream, since this might confuse upstream elements (and/or http servers, for example). Fixes playback of apple trailers in totem and youtube/html5 clips in WebkitGTK+. https://bugzilla.gnome.org/show_bug.cgi?id=632977 I guess the other patch can wait until after the release?