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

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

nit: if (

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

Reply via email to