[FFmpeg-devel] [PATCH v3] avformat/dump: Stream start offsets: change precision and label
softworkz
ffmpegagent at gmail.com
Wed Apr 30 00:16:28 EEST 2025
From: softworkz <softworkz at hotmail.com>
- Change precision to 6 digits to align with other printed times
- Change label to just "Start"
- Add 's' unit to format 'start' value for consistency
Signed-off-by: softworkz <softworkz at hotmail.com>
---
avformat/dump: Change precision of stream start offsets
Changing this to 6 digits to align with other printed times
Signed-off-by: softworkz softworkz at hotmail.com
Versions
========
V2
Following comments from Gyan and Marton:
* Change precision to 6 digits to align with other printed times
* Change label to just "Start"
* Add 's' unit to format 'start' value for consistency
V3
* Remove 's' unit
.
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-72%2Fsoftworkz%2Fsubmit_start_offsets-v3
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-72/softworkz/submit_start_offsets-v3
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/72
Range-diff vs v2:
1: 6ae8a0da2b ! 1: baf0a8677d avformat/dump: Stream start offsets: change precision and label
@@ libavformat/dump.c: FF_ENABLE_DEPRECATION_WARNINGS
if (st->start_time != AV_NOPTS_VALUE && st->start_time != 0 && st->time_base.den && st->time_base.num) {
const double stream_start = av_q2d(st->time_base) * st->start_time;
- av_log(NULL, AV_LOG_INFO, ", Start-Time %.3fs", stream_start);
-+ av_log(NULL, AV_LOG_INFO, ", Start %.6fs", stream_start);
++ av_log(NULL, AV_LOG_INFO, ", Start %.6f", stream_start);
}
dump_disposition(st->disposition, log_level);
-@@ libavformat/dump.c: void av_dump_format(AVFormatContext *ic, int index,
- av_log(NULL, AV_LOG_INFO, ", start: ");
- secs = llabs(ic->start_time / AV_TIME_BASE);
- us = llabs(ic->start_time % AV_TIME_BASE);
-- av_log(NULL, AV_LOG_INFO, "%s%d.%06d",
-+ av_log(NULL, AV_LOG_INFO, "%s%d.%06ds",
- ic->start_time >= 0 ? "" : "-",
- secs,
- (int) av_rescale(us, 1000000, AV_TIME_BASE));
libavformat/dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/dump.c b/libavformat/dump.c
index 8c7db7b275..c263921b99 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -680,7 +680,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (st->start_time != AV_NOPTS_VALUE && st->start_time != 0 && st->time_base.den && st->time_base.num) {
const double stream_start = av_q2d(st->time_base) * st->start_time;
- av_log(NULL, AV_LOG_INFO, ", Start-Time %.3fs", stream_start);
+ av_log(NULL, AV_LOG_INFO, ", Start %.6f", stream_start);
}
dump_disposition(st->disposition, log_level);
base-commit: d9bd8e9eb11015b41fa9b2663da1a6455d88cadb
--
ffmpeg-codebot
More information about the ffmpeg-devel
mailing list