[FFmpeg-devel] [PATCH] Fix seeking HTTP when server uses chunked encoding
Ronald S. Bultje
Sun Jun 20 00:26:33 CEST 2010
On Tue, May 18, 2010 at 4:34 AM, Tomas H?rdin <tomas.hardin at codemill.se> wrote:
> On Tue, 2010-05-11 at 17:18 +0200, Tomas H?rdin wrote:
>> I've attached two patches. The first patch resets chunksize before
>> parsing the headers, which fixes the rare case of a resource switching
>> chunked encoding off between seeks (could happen once the size of a
>> resource becomes known to the server). It also disallows read-write mode
>> and removes the unused http_write() prototype.
>> The second patch does a bit of refactoring to http_connect() as well,
>> splitting it up into two functions: http_send_request() and
> I talked to Bultje a bit on IRC and he wanted a small program to test
> the patches with. I'm attaching it here for anyone else that might be
> It's a small patch to one of the libmicrohttpd examples
> (fileserver_example.c) that adds basic handling of Range/Content-Range.
> To compile, svn checkout https://ng.gnunet.org/svn/libmicrohttpd/ ,
> apply the patch and install in the usual fashion. Then run
> src/examples/fileserver_example in a folder with some test files on say
> port 8888. Finally, ffplay http://localhost:8888/foo.avi before and
> after applying the patch. You'll see that it won't seek properly without
> the patch.
Seeking works using e.g. Apache against current SVN.
What exactly is the problem? Is it microhttpd-specific? I'm fine with
changes, but need to see an actual need for them.
More information about the ffmpeg-devel