diff common.c @ 1598:932d306bf1dc libavcodec

av_log() patch by (Michel Bardiaux <mbardiaux at peaktime dot be>)
author michael
date Mon, 03 Nov 2003 13:26:22 +0000
parents dd544554ed42
children fdb8244da1e5
line wrap: on
line diff
--- a/common.c	Sun Nov 02 23:19:47 2003 +0000
+++ b/common.c	Mon Nov 03 13:26:22 2003 +0000
@@ -196,7 +196,8 @@
 int check_marker(GetBitContext *s, const char *msg)
 {
     int bit= get_bits1(s);
-    if(!bit) printf("Marker bit missing %s\n", msg);
+    if(!bit)
+	    av_log(NULL, AV_LOG_INFO, "Marker bit missing %s\n", msg);
 
     return bit;
 }
@@ -281,11 +282,11 @@
                 nb = 1 << (table_nb_bits - n);
                 for(k=0;k<nb;k++) {
 #ifdef DEBUG_VLC
-                    printf("%4x: code=%d n=%d\n",
+                    av_log(AV_LOG_DEBUG, "%4x: code=%d n=%d\n",
                            j, i, n);
 #endif
                     if (table[j][1] /*bits*/ != 0) {
-                        fprintf(stderr, "incorrect codes\n");
+                        av_log(NULL, AV_LOG_ERROR, "incorrect codes\n");
                         av_abort();
                     }
                     table[j][1] = n; //bits