diff mbox

[FFmpeg-devel] avformat: correct fdebug loglevel

Message ID a6e22f0e-32ed-d705-c869-6f0bc9d515a7@gmail.com
State Accepted
Commit 02741853d74d214540aca4cd456877348d4f8953
Headers show

Commit Message

Gyan Aug. 13, 2018, 7:22 a.m. UTC
3e4b5e68c1 intended for fdebug to be usable without -v and cmdutils sets 
v to DEBUG but most fdebug logs are at TRACE. Changed.
From 0b349a958d6af8ce09ef7d36a34e3f0d3f6b0692 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <ffmpeg@gyani.pro>
Date: Mon, 13 Aug 2018 12:32:41 +0530
Subject: [PATCH] avformat: correct fdebug loglevel

fftools/cmdutils sets loglevel for fdebug to DEBUG but all fdebug output
except for two were emitted at TRACE.
---
 libavformat/mpeg.c  | 6 +++---
 libavformat/mux.c   | 6 +++---
 libavformat/utils.c | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

Comments

Gyan Aug. 14, 2018, 7:28 a.m. UTC | #1
On 13-08-2018 12:52 PM, Gyan Doshi wrote:
> 3e4b5e68c1 intended for fdebug to be usable without -v and cmdutils sets 
> v to DEBUG but most fdebug logs are at TRACE. Changed.

Plan to push tonight.
Gyan Aug. 14, 2018, 4:56 p.m. UTC | #2
On 14-08-2018 12:58 PM, Gyan Doshi wrote:
> 
> 
> On 13-08-2018 12:52 PM, Gyan Doshi wrote:
>> 3e4b5e68c1 intended for fdebug to be usable without -v and cmdutils 
>> sets v to DEBUG but most fdebug logs are at TRACE. Changed.
> 
> Plan to push tonight.

Pushed as 02741853d74d214540aca4cd456877348d4f8953
diff mbox

Patch

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 8ae4740920..159ea41bec 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -647,7 +647,7 @@  found:
     pkt->stream_index = st->index;
 
     if (s->debug & FF_FDEBUG_TS)
-        av_log(s, AV_LOG_TRACE, "%d: pts=%0.3f dts=%0.3f size=%d\n",
+        av_log(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f size=%d\n",
             pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0,
             pkt->size);
 
@@ -668,7 +668,7 @@  static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
         len = mpegps_read_pes_header(s, &pos, &startcode, &pts, &dts);
         if (len < 0) {
             if (s->debug & FF_FDEBUG_TS)
-                av_log(s, AV_LOG_TRACE, "none (ret=%d)\n", len);
+                av_log(s, AV_LOG_DEBUG, "none (ret=%d)\n", len);
             return AV_NOPTS_VALUE;
         }
         if (startcode == s->streams[stream_index]->id &&
@@ -678,7 +678,7 @@  static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
         avio_skip(s->pb, len);
     }
     if (s->debug & FF_FDEBUG_TS)
-        av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n",
+        av_log(s, AV_LOG_DEBUG, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n",
             pos, dts, dts / 90000.0);
     *ppos = pos;
     return dts;
diff --git a/libavformat/mux.c b/libavformat/mux.c
index a13f0e3a1b..2847a02a19 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -571,7 +571,7 @@  static int compute_muxer_pkt_fields(AVFormatContext *s, AVStream *st, AVPacket *
     }
 
     if (s->debug & FF_FDEBUG_TS)
-        av_log(s, AV_LOG_TRACE, "compute_muxer_pkt_fields: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
+        av_log(s, AV_LOG_DEBUG, "compute_muxer_pkt_fields: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
             av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), delay, pkt->size, pkt->stream_index);
 
     if (pkt->duration < 0 && st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) {
@@ -633,7 +633,7 @@  static int compute_muxer_pkt_fields(AVFormatContext *s, AVStream *st, AVPacket *
     }
 
     if (s->debug & FF_FDEBUG_TS)
-        av_log(s, AV_LOG_TRACE, "av_write_frame: pts2:%s dts2:%s\n",
+        av_log(s, AV_LOG_DEBUG, "av_write_frame: pts2:%s dts2:%s\n",
             av_ts2str(pkt->pts), av_ts2str(pkt->dts));
 
     st->cur_dts = pkt->dts;
@@ -1200,7 +1200,7 @@  int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
             goto fail;
 
         if (s->debug & FF_FDEBUG_TS)
-            av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
+            av_log(s, AV_LOG_DEBUG, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
                 pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));
 
 #if FF_API_COMPUTE_PKT_FIELDS2 && FF_API_LAVF_AVCTX
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c9cdd2b470..fcd4328587 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1332,7 +1332,7 @@  static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
         presentation_delayed = 1;
 
     if (s->debug & FF_FDEBUG_TS)
-        av_log(s, AV_LOG_TRACE,
+        av_log(s, AV_LOG_DEBUG,
             "IN delayed:%d pts:%s, dts:%s cur_dts:%s st:%d pc:%p duration:%"PRId64" delay:%d onein_oneout:%d\n",
             presentation_delayed, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts),
             pkt->stream_index, pc, pkt->duration, delay, onein_oneout);
@@ -1401,7 +1401,7 @@  static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
         st->cur_dts = pkt->dts;
 
     if (s->debug & FF_FDEBUG_TS)
-        av_log(s, AV_LOG_TRACE, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n",
+        av_log(s, AV_LOG_DEBUG, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n",
             presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts));
 
     /* update flags */