[FFmpeg-devel] [PATCH] fix two checks in ffserver.c

Baptiste Coudurier baptiste.coudurier
Sun Jun 22 04:36:13 CEST 2008


Hi,

Erik Hovland wrote:
> [...]
> 
> diff --git a/ffserver.c b/ffserver.c
> index 5464176..41e1b59 100644
> --- a/ffserver.c
> +++ b/ffserver.c
> @@ -392,11 +392,12 @@ static void start_children(FFStream *feed)
>  
>                  if (!ffserver_debug) {
>                      i = open("/dev/null", O_RDWR);
> -                    if (i)
> +                    if (i >= 0)
>                          dup2(i, 0);
> +
>                      dup2(i, 1);
>                      dup2(i, 2);
> -                    if (i)
> +                    if (i >= 0)
>                          close(i);
>                  }

Fixed differently.

>  
> @@ -1611,7 +1612,7 @@ static void compute_stats(HTTPContext *c)
>      url_fprintf(pb, "\r\n");
>  
>      url_fprintf(pb, "<HEAD><TITLE>%s Status</TITLE>\n", program_name);
> -    if (c->stream->feed_filename)
> +    if (c->stream->feed_filename[0])
>          url_fprintf(pb, "<link rel=\"shortcut icon\" href=\"%s\">\n", c->stream->feed_filename);
>      url_fprintf(pb, "</HEAD>\n<BODY>");
>      url_fprintf(pb, "<H1>%s Status</H1>\n", program_name);
> 

Applied.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA




More information about the ffmpeg-devel mailing list