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 632977 - [queue2] qtdemux causes soup to request seeks past the end of the range
[queue2] qtdemux causes soup to request seeks past the end of the range
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-23 14:07 UTC by Sjoerd Simons
Modified: 2010-12-02 18:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
souphttpsrc: Don't send seeks behind the end of file to the server (2.49 KB, patch)
2010-10-31 17:09 UTC, Sebastian Dröge (slomo)
committed Details | Review
queue2: don't send seeks beyond the end of the file upstream in pull mode (4.34 KB, patch)
2010-10-31 19:53 UTC, Tim-Philipp Müller
committed Details | Review

Description Sjoerd Simons 2010-10-23 14:07:40 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 :/
Comment 1 Tim-Philipp Müller 2010-10-31 15:09:57 UTC
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?)
Comment 2 Sebastian Dröge (slomo) 2010-10-31 17:09:35 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2010-10-31 17:16:28 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2010-10-31 17:52:41 UTC
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 ;)
Comment 5 Sebastian Dröge (slomo) 2010-10-31 17:57:37 UTC
No, ignore the last comment. qtdemux sends EOS because queue2 return UNEXPECTED. It's all good
Comment 6 Tim-Philipp Müller 2010-10-31 19:53:34 UTC
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.
Comment 7 Philippe Normand 2010-10-31 23:23:46 UTC
The queue2 patch also fixes youtube/html5 playback in WebkitGTK+, thanks for hunting this one down :)
Comment 8 Tim-Philipp Müller 2010-11-01 14:40:04 UTC
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?