[PATCH 4/5] cosmetics printf to av_log

Peter Holik peter
Mon Jun 1 19:17:13 CEST 2009


Signed-off-by: Peter Holik <peter at holik.at>
---
 libavformat/http.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index 68efbf9..fb3b934 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -29,8 +29,6 @@
 /* XXX: POST protocol is not completely implemented because ffmpeg uses
    only a subset of it. */
 
-//#define DEBUG
-
 /* used for protocol handling */
 #define BUFFER_SIZE 1024
 #define URL_SIZE    4096
@@ -192,9 +190,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);
+
         /* error codes are 4xx and 5xx */
         if (s->http_code >= 400 && s->http_code < 600)
             return -1;
@@ -278,9 +276,9 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr,
     for(;;) {
         if (http_get_line(s, line, sizeof(line)) < 0)
             return AVERROR(EIO);
-#ifdef DEBUG
-        printf("header='%s'\n", line);
-#endif
+
+        av_log(NULL, AV_LOG_DEBUG, "header='%s'\n", line);
+
         err = process_line(h, line, s->line_count, new_location);
         if (err < 0)
             return err;
-- 
1.6.3.1

------=_20090601194625_76390
Content-Type: text/x-patch; name="0005-http-Transfer-Encoding-chunked.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
      filename="0005-http-Transfer-Encoding-chunked.patch"




More information about the ffmpeg-devel mailing list