changeset 4956:95ea72d4e51d libavformat

move DEBUG define before include to get dprintf and change printf to dprintf
author bcoudurier
date Sun, 24 May 2009 22:59:25 +0000
parents 6671e7510fca
children 911053932726
files avidec.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/avidec.c	Sun May 24 10:26:41 2009 +0000
+++ b/avidec.c	Sun May 24 22:59:25 2009 +0000
@@ -19,6 +19,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+//#define DEBUG
+//#define DEBUG_SEEK
+
 #include "libavutil/intreadwrite.h"
 #include "libavutil/bswap.h"
 #include "avformat.h"
@@ -29,9 +32,6 @@
 #undef NDEBUG
 #include <assert.h>
 
-//#define DEBUG
-//#define DEBUG_SEEK
-
 typedef struct AVIStream {
     int64_t frame_offset; /* current frame (video) or byte (audio) counter
                          (used to compute the pts) */
@@ -78,7 +78,7 @@
 #ifdef DEBUG
 static void print_tag(const char *str, unsigned int tag, int size)
 {
-    printf("%s: tag=%c%c%c%c size=0x%x\n",
+    dprintf(NULL, "%s: tag=%c%c%c%c size=0x%x\n",
            str, tag & 0xff,
            (tag >> 8) & 0xff,
            (tag >> 16) & 0xff,
@@ -287,7 +287,7 @@
                 if(size) avi->movi_end = avi->movi_list + size + (size & 1);
                 else     avi->movi_end = url_fsize(pb);
 #ifdef DEBUG
-                printf("movi end=%"PRIx64"\n", avi->movi_end);
+                dprintf(NULL, "movi end=%"PRIx64"\n", avi->movi_end);
 #endif
                 goto end_of_header;
             }