[FFmpeg-soc] [PATCH] rtsp tunneling

Ronald S. Bultje rsbultje at gmail.com
Mon Jun 7 17:16:38 CEST 2010


Hi,

#1:

On Sun, Jun 6, 2010 at 10:10 PM, Josh Allmann <joshua.allmann at gmail.com> wrote:
> +        if (ret != 0) {
> +            return ret;
> +        }

Superfluous {}.

> +    /* A size of zero can be used to force
> +     * initializaton of the connection. */
> +    if (!size)
> +        return 0;

Eh... I'm not sure I like that.

#2:

> +static inline int has_header(const char *str, const char *header)
> +{
> +    return av_stristart(str, header+2, &str) || av_stristr(str, header);
> +}

av_stristart(a, b, NULL) should work also. Why header+2 (I know it's
because of \r\n, but please document that because we'll forget...)?

#5:

>              av_strlcat(buf, str, sizeof(buf));
>          av_free(str);
>      }
> +
>      if (send_content_length > 0 && send_content)
>          av_strlcatf(buf, sizeof(buf), "Content-Length: %d\r\n", send_content_length);

Cosmetic.

The rest looks nice, I hope we can apply in the next round.

Ronald


More information about the FFmpeg-soc mailing list