Opened 18 years ago

Last modified 13 years ago

#503 new defect

mplayer gets confused when playing avi from web and getting the whole file in response to a "Range" request.

Reported by: mplayer@… Owned by: reimar
Priority: normal Component: demuxer
Version: 1.0pre7 Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

It I have an .avi file on a (slightly weird, but AFAIU not completely
non-conformant) web server that:

  • Would advertize "Accept-Ranges: bytes" in its HTTP response header.
  • Does not actually support it and would send the whole file in response to a

"Range: ..." HTTP request
then mplayer gets confused when being pointer to that .avi URL.

Namely, it would loop, sending repeated HTTP requests with various "junk" (even
negative at times) "Range: ..." headers.

P.S. Once the server is fixed to send "Accept-Ranges: none", the problem goes away.

P.P.S. The server that send the wrong "Accept-Ranges:" header is gallery2
(http://www.gallery2.org/), I've filed an RFE to fix it at
http://sourceforge.net/tracker/index.php?func=detail&aid=1495690&group_id=7130&atid=357130

Attachments (1)

gallery.log (18.7 KB ) - added by mplayer@… 18 years ago.
Output of "mplayer -v -v -v URL.avi"

Download all attachments as: .zip

Change History (5)

by mplayer@…, 18 years ago

Attachment: gallery.log added

Output of "mplayer -v -v -v URL.avi"

comment:1 by mplayer@…, 18 years ago

comment:2 by reimar, 18 years ago

AFAIK this is not fixable, since IIRC when MPlayer sees accept-ranges it tries
to read the index at the end of the file to allow seeking - which obviously
cannot work in such a case (or does the server indicate that it starts sending
data from the beginning? Then a minor improvement might be possible).
You could also try the -noidx switch, maybe it helps.

comment:3 by mplayer@…, 18 years ago

(In reply to comment #2)

or does the server indicate that it starts sending data from the beginning?

It definitely does. When it sends the requested partial data,

  • The HTTP status code is 206 (Partial Content) - see

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.7

  • The HTTP response header includes the Content-Range field thast specifies

what exactly was returned (according to the specs, this field MUST be present in
any "206" response). This is the header that tells what was actually sent, so it
would be nice if mplayer paid attention to it. See
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16

When the server sends the complete file,

  • The HTTP status code would be the usual 200 (OK) instead of 206
  • There would be no Content-Range header.

comment:4 by compn, 13 years ago

Owner: changed from r_togni@… to reimar
Note: See TracTickets for help on using tickets.