[MPlayer-dev-eng] [PATCH] Fix interpretation of Accept-Ranges http header to match the RFC

The Wanderer inverseparadox at comcast.net
Thu Jul 10 21:38:00 CEST 2008


Alexander Kanavin wrote:

> ext The Wanderer wrote:
> 
>> Assuming that it does not, as you indicate MPlayer currently does,
>> seems to me to be the less potentially problematic of the two
>> possible approaches; it means not trying to seek some of the time
>> when it would succeed, but the alternative would be to try to seek
>> some of the time when it will fail.
> 
> From my pov this approach is in fact more problematic. Setting up the
> playback of some files (mp4, mov, mp3) requires seeking to the end
> of file and back. Before the patch, if the header is absent the
> playback will simply always fail. After the patch, it will either
> succeed, or fail a bit later when the actual seek is attempted. This
> is not a theoretical objection; I developed this patch to begin with
> because I'm trying to make mplayer work with a (proprietary) web
> server built into Nokia handsets that won't send the header, but
> allows seeking just fine, and is in full compliance with http spec to
> behave like that.

In one of the roughly four iterations my previous post went through
before being sent, there was a note that it might be reasonable to have
a command-line option to override the assumption being made about cases
where no header is provided. Apparently that note didn't make it into
the post I actually sent.

As Reimar noted, the ideal solution would be to determine whether
seeking works by testing it out, but doing that in an acceptable way
might not be trivial.

(For what little it's worth, I've never seen playback of a file via HTTP
fail for lack of seeking. It's possible that I've just happened to
always hit servers which did things right; it's also likely that my
sample size is sharply limited because for non-realtime streams I almost
invariably download, via -dumpstream or wget, before playing.)

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.



More information about the MPlayer-dev-eng mailing list