Commit c13b250b authored by Baptiste Coudurier's avatar Baptiste Coudurier

move DEBUG define before include to get dprintf and change printf to dprintf

Originally committed as revision 18932 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 09d1208c
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
//#define DEBUG
//#define DEBUG_SEEK
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "libavutil/bswap.h" #include "libavutil/bswap.h"
#include "avformat.h" #include "avformat.h"
...@@ -29,9 +32,6 @@ ...@@ -29,9 +32,6 @@
#undef NDEBUG #undef NDEBUG
#include <assert.h> #include <assert.h>
//#define DEBUG
//#define DEBUG_SEEK
typedef struct AVIStream { typedef struct AVIStream {
int64_t frame_offset; /* current frame (video) or byte (audio) counter int64_t frame_offset; /* current frame (video) or byte (audio) counter
(used to compute the pts) */ (used to compute the pts) */
...@@ -78,7 +78,7 @@ static int guess_ni_flag(AVFormatContext *s); ...@@ -78,7 +78,7 @@ static int guess_ni_flag(AVFormatContext *s);
#ifdef DEBUG #ifdef DEBUG
static void print_tag(const char *str, unsigned int tag, int size) 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, str, tag & 0xff,
(tag >> 8) & 0xff, (tag >> 8) & 0xff,
(tag >> 16) & 0xff, (tag >> 16) & 0xff,
...@@ -287,7 +287,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -287,7 +287,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
if(size) avi->movi_end = avi->movi_list + size + (size & 1); if(size) avi->movi_end = avi->movi_list + size + (size & 1);
else avi->movi_end = url_fsize(pb); else avi->movi_end = url_fsize(pb);
#ifdef DEBUG #ifdef DEBUG
printf("movi end=%"PRIx64"\n", avi->movi_end); dprintf(NULL, "movi end=%"PRIx64"\n", avi->movi_end);
#endif #endif
goto end_of_header; goto end_of_header;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment