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

Ronald S. Bultje rsbultje
Wed May 27 15:37:59 CEST 2009


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. So I don't really know. Anyone else has opinions
on this? (Sorry for this btw Peter, this got a bit longer than
originally intended, not your fault.)

Ronald



More information about the ffmpeg-devel mailing list