[Ffmpeg-devel] [PATCH] printf to av_log and enable DEBUG_SEEK default
Limin Wang
lance.lmwang
Tue Mar 6 09:08:08 CET 2007
Hi,
Maybe it's more proper to replace printf with av_log
and enable DEBUG_SEEK default. Please review this patch.
Thanks,
Limin
-------------- next part --------------
Index: libavformat/mpeg.c
===================================================================
--- libavformat/mpeg.c (revision 8268)
+++ libavformat/mpeg.c (working copy)
@@ -23,7 +23,7 @@
#include "fifo.h"
#define MAX_PAYLOAD_SIZE 4096
-//#define DEBUG_SEEK
+#define DEBUG_SEEK
#undef NDEBUG
#include <assert.h>
@@ -1738,14 +1738,14 @@
pos = *ppos;
#ifdef DEBUG_SEEK
- printf("read_dts: pos=0x%"PRIx64" next=%d -> ", pos, find_next);
+ av_log(s, AV_LOG_DEBUG, "read_dts: pos=0x%"PRIx64" ", pos);
#endif
url_fseek(&s->pb, pos, SEEK_SET);
for(;;) {
len = mpegps_read_pes_header(s, &pos, &startcode, &pts, &dts);
if (len < 0) {
#ifdef DEBUG_SEEK
- printf("none (ret=%d)\n", len);
+ av_log(s, AV_LOG_DEBUG, "none (ret=%d)\n", len);
#endif
return AV_NOPTS_VALUE;
}
@@ -1756,7 +1756,7 @@
url_fskip(&s->pb, len);
}
#ifdef DEBUG_SEEK
- printf("pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n", pos, dts, dts / 90000.0);
+ av_log(s, AV_LOG_DEBUG, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n", pos, dts, dts / 90000.0);
#endif
*ppos = pos;
return dts;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070306/9bb00560/attachment.pgp>
More information about the ffmpeg-devel
mailing list