[FFmpeg-cvslog] avformat/mpeg: put timestamp trace av_logs under FF_DEBUG_TS

Michael Niedermayer git at videolan.org
Mon Apr 20 18:29:11 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 20 17:41:22 2015 +0200| [57865a974780c4427cc5084629c75e4ac1d87a74] | committer: Michael Niedermayer

avformat/mpeg: put timestamp trace av_logs under FF_DEBUG_TS

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mpeg.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 2f8b213..9cc0422 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -625,7 +625,9 @@ found:
     pkt->dts          = dts;
     pkt->pos          = dummy_pos;
     pkt->stream_index = st->index;
-    av_log(s, AV_LOG_TRACE, "%d: pts=%0.3f dts=%0.3f size=%d\n",
+
+    if (s->debug & FF_FDEBUG_TS)
+        av_log(s, AV_LOG_TRACE, "%d: pts=%0.3f dts=%0.3f size=%d\n",
             pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0,
             pkt->size);
 
@@ -645,7 +647,8 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
     for (;;) {
         len = mpegps_read_pes_header(s, &pos, &startcode, &pts, &dts);
         if (len < 0) {
-            av_log(s, AV_LOG_TRACE, "none (ret=%d)\n", len);
+            if (s->debug & FF_FDEBUG_TS)
+                av_log(s, AV_LOG_TRACE, "none (ret=%d)\n", len);
             return AV_NOPTS_VALUE;
         }
         if (startcode == s->streams[stream_index]->id &&
@@ -654,7 +657,8 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
         }
         avio_skip(s->pb, len);
     }
-    av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n",
+    if (s->debug & FF_FDEBUG_TS)
+        av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n",
             pos, dts, dts / 90000.0);
     *ppos = pos;
     return dts;



More information about the ffmpeg-cvslog mailing list