diff mbox series

[FFmpeg-devel,v2,1/1] avformat/dump: Print codec level and stream start offsets for input streams

Message ID MN2PR04MB59811F1BF5705A7C38F53ECFBAB79@MN2PR04MB5981.namprd04.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,v2,1/1] avformat/dump: Print codec level and stream start offsets for input streams
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Soft Works Oct. 13, 2021, 12:11 p.m. UTC
Signed-off-by: softworkz <softworkz@hotmail.com>
---
v2: rearrange code to fix warning

 libavformat/dump.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 4824965ee9..58bb28d06e 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -566,6 +566,9 @@  static void dump_stream_format(const AVFormatContext *ic, int i,
         int tbr = st->r_frame_rate.den && st->r_frame_rate.num;
         int tbn = st->time_base.den && st->time_base.num;
 
+        if (st->codecpar->level > 0)
+            av_log(NULL, AV_LOG_INFO, ", Level %d", st->codecpar->level);
+
         if (fps || tbr || tbn)
             av_log(NULL, AV_LOG_INFO, "%s", separator);
 
@@ -577,6 +580,11 @@  static void dump_stream_format(const AVFormatContext *ic, int i,
             print_fps(1 / av_q2d(st->time_base), "tbn");
     }
 
+    if (st->start_time != AV_NOPTS_VALUE && st->start_time != 0 && st->time_base.den && st->time_base.num) {
+        const double stream_start = st->start_time * av_q2d(st->time_base);
+        av_log(NULL, AV_LOG_INFO, ", Start-Time %.3fs", stream_start);
+    }
+
     if (st->disposition & AV_DISPOSITION_DEFAULT)
         av_log(NULL, AV_LOG_INFO, " (default)");
     if (st->disposition & AV_DISPOSITION_DUB)