On 04/05/2011 02:31 PM, Diego Biurrun wrote:
> On Mon, Apr 04, 2011 at 03:40:14PM +0200, Luca Barbato wrote:
>> this way is possible to have simple micro-server act like
>>
>> ffmpeg -i file.nut -vcodec copy -acodec copy -f nut tcp://foo:1234?listen
>> --- a/libavformat/tcp.c
>> +++ b/libavformat/tcp.c
>> @@ -48,6 +52,12 @@ static int tcp_open(URLContext *h, const char *uri, int 
>> flags)
>>  
>> +    p = strchr(uri, '?');
>> +    if (p) {
>> +        if (av_find_info_tag(buf, sizeof(buf), "listen", p)) {
>> +            listen_socket = 1;
>> +        }
>> +    }
> 
> nit: possibly merge conditions and drop braces

I'll drop just the inner braces, probably another option will appear soon.

>> @@ -66,10 +76,21 @@ static int tcp_open(URLContext *h, const char *uri, int 
>> flags)
>>  
>> +    if(listen_socket) {
> 
> nit: if (

Right.

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

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

Reply via email to