[FFmpeg-devel] [PATCH] http Transfer-Encoding chunked

Måns Rullgård mans
Thu May 28 21:33:26 CEST 2009


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> Hi,
>
> On Wed, May 27, 2009 at 2:54 AM, Peter Holik <peter at holik.at> wrote:
>> changed to av_log.
>
> @@ -171,9 +169,9 @@ static int process_line(URLContext *h, char *line,
> int line_count,
>          while (isspace(*p))
>              p++;
>          s->http_code = strtol(p, NULL, 10);
> -#ifdef DEBUG
> -        printf("http_code=%d\n", s->http_code);
> -#endif
> +
> +        av_log(NULL, AV_LOG_DEBUG, "http code=%d\n", s->http_code);
>
> NULL sucks, but URLContext only has a log context starting next major revision.
>
> I would almost suggest adding the following:
>
> #if LIBAVFORMAT_VERSION_MAJOR >= 53
> av_log(h,
> #else
> av_log(NULL,
> #endif
>         AV_LOG_DEBUG, ..);
> (or the whole thing inside the #if/#else.)
>
> Problem: that's ugly.

It is ugly indeed.  Less ugly would be a macro expanding to h or NULL
depending on the version.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list