From: Diego Biurrun Date: Wed, 11 Nov 2009 21:57:50 +0000 (+0000) Subject: Add '#undef fprintf' before PRINT macro that uses fprintf. X-Git-Tag: v0.6~2669 X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=ca02d8ec97ce50bfc36ff094d46afa331559ea64 Add '#undef fprintf' before PRINT macro that uses fprintf. Otherwise there may be trouble when fprintf is disabled in favor of av_log. Originally committed as revision 20515 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavformat/utils.c b/libavformat/utils.c index e54a6f31cc..a9d07fa645 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3219,6 +3219,7 @@ int av_get_frame_filename(char *buf, int buf_size, 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;istream_index); PRINT(" keyframe=%d\n", ((pkt->flags & PKT_FLAG_KEY) != 0));