[FFmpeg-cvslog] ffplay: in video_thread(), use av_dlog() for timestamp logging.

Stefano Sabatini git
Mon Jan 31 18:48:16 CET 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat Jan 22 15:35:00 2011 +0100| [97b925ea811871dfb2696348625ee763793e84c1] | committer: Michael Niedermayer

ffplay: in video_thread(), use av_dlog() for timestamp logging.

Disable logging of rescaled timestamps if DEBUG is not enabled.
Avoid debug log spamming with -loglevel debug.

Signed-off-by: Mans Rullgard <mans at mansr.com>
(cherry picked from commit 13156f40e1f17ec1d0c57e6bf7a2850f673600c0)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97b925ea811871dfb2696348625ee763793e84c1
---

 ffplay.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 840df66..edc6097 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)
@@ -1853,12 +1854,12 @@ 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);
-            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);
+            av_dlog(NULL, "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);
         }
 #else
         ret = get_video_frame(is, frame, &pts_int, &pkt);




More information about the ffmpeg-cvslog mailing list