[FFmpeg-devel] [Patch] Use Transfer-Encoding: chunked (and perhaps PUT) for HTTP uploads

Mans Rullgard mans
Tue Dec 22 14:56:23 CET 2009



"Diego Biurrun" <diego at biurrun.de> wrote:

>On Tue, Dec 22, 2009 at 12:52:29PM +0000, Mans Rullgard wrote:
>> 
>> 
>> "Diego Biurrun" <diego at biurrun.de> wrote:
>> 
>> >On Tue, Dec 22, 2009 at 01:22:07PM +0100, Tomas H?rdin wrote:
>> >> 
>> >> --- libavformat/http.c	(revision 20911)
>> >> +++ libavformat/http.c	(working copy)
>> >> @@ -344,13 +348,49 @@
>> >> +
>> >> +        if ((ret = url_write(s->hd, temp, strlen(temp))) < 0)
>> >> +            return ret;
>> >> +
>> >> +        /* chunk-data */
>> >> +        if ((ret = url_write(s->hd, buf, size)) < 0)
>> >> +            return ret;
>> >> +
>> >> +        /* CRLF */
>> >> +        if ((ret = url_write(s->hd, crlf, sizeof(crlf) - 1)) < 0)
>> >> +            return ret;
>> >
>> >These if statements can be merged ..
>> 
>> No.
>
>Hehe, yes, but they can be compacted with 'else'. :)

That will hardly improve readability.
-- 
Mans Rullgard
mans at mansr.com



More information about the ffmpeg-devel mailing list