[FFmpeg-cvslog] avformat/dump: Print tbc value

Michael Niedermayer git at videolan.org
Sat Jun 4 23:13:13 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Jun  3 23:29:05 2016 +0200| [bb3388fd60e55db0b162dc78409ae495cbc6b64f] | committer: Michael Niedermayer

avformat/dump: Print tbc value

Fixes regression of av_dump_format()
Fixes part of Ticket 5444

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/dump.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 7ff5ef0..126b624 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -492,16 +492,19 @@ static void dump_stream_format(AVFormatContext *ic, int i,
         int fps = st->avg_frame_rate.den && st->avg_frame_rate.num;
         int tbr = st->r_frame_rate.den && st->r_frame_rate.num;
         int tbn = st->time_base.den && st->time_base.num;
+        int tbc = st->codec->time_base.den && st->codec->time_base.num;
 
-        if (fps || tbr || tbn)
+        if (fps || tbr || tbn || tbc)
             av_log(NULL, AV_LOG_INFO, "%s", separator);
 
         if (fps)
-            print_fps(av_q2d(st->avg_frame_rate), tbr || tbn ? "fps, " : "fps");
+            print_fps(av_q2d(st->avg_frame_rate), tbr || tbn || tbc ? "fps, " : "fps");
         if (tbr)
-            print_fps(av_q2d(st->r_frame_rate), tbn ? "tbr, " : "tbr");
+            print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr");
         if (tbn)
-            print_fps(1 / av_q2d(st->time_base), "tbn");
+            print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn");
+        if (tbc)
+            print_fps(1 / av_q2d(st->codec->time_base), "tbc");
     }
 
     if (st->disposition & AV_DISPOSITION_DEFAULT)



More information about the ffmpeg-cvslog mailing list