[FFmpeg-devel] [PATCH] In video_thread(), disable logging of rescaled timestamps if DEBUG is not enabled.
Stefano Sabatini
stefano.sabatini-lala
Thu Jan 27 01:01:24 CET 2011
Avoid debug log spamming with -loglevel debug when the user is not
debugging that code.
---
ffplay.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 8c06991..f494993 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -58,6 +58,7 @@
const char program_name[] = "FFplay";
const int program_birth_year = 2003;
+//#define DEBUG
//#define DEBUG_SYNC
#define MAX_QUEUE_SIZE (15 * 1024 * 1024)
@@ -1856,12 +1857,14 @@ static int video_thread(void *arg)
}
if (av_cmp_q(tb, is->video_st->time_base)) {
- int64_t pts1 = pts_int;
+ av_unused int64_t pts1 = pts_int;
pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base);
+#ifdef DEBUG
av_log(NULL, AV_LOG_DEBUG, "video_thread(): "
"tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n",
tb.num, tb.den, pts1,
is->video_st->time_base.num, is->video_st->time_base.den, pts_int);
+#endif
}
#else
ret = get_video_frame(is, frame, &pts_int, &pkt);
--
1.7.2.3
More information about the ffmpeg-devel
mailing list