changeset 5363:4696e193f943 libavformat

Add '#undef fprintf' before PRINT macro that uses fprintf. Otherwise there may be trouble when fprintf is disabled in favor of av_log.
author diego
date Wed, 11 Nov 2009 21:57:50 +0000
parents 6f5a1064e48a
children 4a925b59dc1b
files utils.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Wed Nov 11 20:24:23 2009 +0000
+++ b/utils.c	Wed Nov 11 21:57:50 2009 +0000
@@ -3219,6 +3219,7 @@
 static void hex_dump_internal(void *avcl, FILE *f, int level, uint8_t *buf, int size)
 {
     int len, i, j, c;
+#undef fprintf
 #define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0)
 
     for(i=0;i<size;i+=16) {
@@ -3257,6 +3258,7 @@
  //FIXME needs to know the time_base
 static void pkt_dump_internal(void *avcl, FILE *f, int level, AVPacket *pkt, int dump_payload)
 {
+#undef fprintf
 #define PRINT(...) do { if (!f) av_log(avcl, level, __VA_ARGS__); else fprintf(f, __VA_ARGS__); } while(0)
     PRINT("stream #%d:\n", pkt->stream_index);
     PRINT("  keyframe=%d\n", ((pkt->flags & PKT_FLAG_KEY) != 0));