[FFmpeg-devel] [PATCH] Fix seeking HTTP when server uses chunked encoding

Martin Storsjö martin
Mon Jun 21 10:27:27 CEST 2010

On Sun, 20 Jun 2010, Ronald S. Bultje wrote:

> On Sun, Jun 20, 2010 at 12:57 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> > On , 19 Jun 2010, Ronald S. Bultje wrote:
> >> As far as I understand the issue, it's not specifiec to microhttpd, but to
> >> any server that serves normal content using chunked encoding. Most common
> >> http servers doesn't do that, but it's fully allowed if the client does
> >> the request using HTTP/1.1.
> >
> > Content is not chunked. Content-Range is missing, indicating the server does
> > not support seeking. Not sure why it hangs afterwards, but the failure to
> > seek is expected.
> The hang is likely a bug elsewhere, it happens only for some demuxers
> (ASF), not others (RM). We can look into that, but anyway... The
> microlibhttpd server simply doesn't support seeking, so the behaviour
> of http.c is correct. I've added some checks to make sure it handles
> switching between chunked/non-chunked encoding (Thomas said that was
> an issue), but other than that, I don't think there's a bug here.

Thanks for applying those hunks, they're correct.

As for the problems with seeking you mentioned on irc, I guess that's due 
to is_streamed being left at 1 in the ByteIOContext, which is the main 
regression due to http delay opening.

// Martin

More information about the ffmpeg-devel mailing list