On 03/08/14 11:28, Martin Storsjö wrote:
> On Sat, 2 Aug 2014, Luca Barbato wrote:
> 
>> Split return value handling from the actual opening.
>>
>> Incidentally fixes the https -> http redirect issue reported by
>> Compn on behalf of rcombs.
>>
>> CC: [email protected]
>> ---
>> libavformat/http.c | 40 ++++++++++++++++++++++++++--------------
>> 1 file changed, 26 insertions(+), 14 deletions(-)
>>
>> diff --git a/libavformat/http.c b/libavformat/http.c
>> index bd75611..526d09d 100644
>> --- a/libavformat/http.c
>> +++ b/libavformat/http.c
>> @@ -132,21 +132,16 @@ void ff_http_init_auth_state(URLContext *dest,
>> const URLContext *src)
>>            sizeof(HTTPAuthState));
>> }
>>
>> -/* return non zero if error */
>> -static int http_open_cnx(URLContext *h, AVDictionary **options)
>> +static int http_open_cnx_internal(URLContext *h, AVDictionary **options)
>> {
>> -    const char *path, *proxy_path, *lower_proto = "tcp", *local_path;
>> +    HTTPContext *s = h->priv_data;
>>     char hostname[1024], hoststr[1024], proto[10];
>>     char auth[1024], proxyauth[1024] = "";
>>     char path1[MAX_URL_SIZE];
>>     char buf[1024], urlbuf[MAX_URL_SIZE];
>> -    int port, use_proxy, err, location_changed = 0, redirects = 0,
>> attempts = 0;
>> -    HTTPAuthType cur_auth_type, cur_proxy_auth_type;
>> -    HTTPContext *s = h->priv_data;
>> +    int port, use_proxy, err, location_changed = 0;
>> +    const char *path, *proxy_path, *lower_proto = "tcp", *local_path;
> 
> Could you avoid moving the variables that don't strictly need to be
> moved here, to get an easier to read diff to see which variable
> declarations that actually have been removed - if any? It seems to me
> that cur_auth_type, cur_proxy_auth_type, redirects and attempts have
> been removed, and the rest just reordered?

I'll keep the former order and push, I moved them one line at time more
or less so that caused confusion, thanks for spotting.

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to