From: softworkz <softwo...@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 <softwo...@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 softwo...@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

Published-As: 
https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-72%2Fsoftworkz%2Fsubmit_start_offsets-v2
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg 
pr-ffstaging-72/softworkz/submit_start_offsets-v2
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/72

Range-diff vs v1:

 1:  5f3052624c ! 1:  6ae8a0da2b avformat/dump: Change precision of stream 
start offsets
     @@ Metadata
      Author: softworkz <softwo...@hotmail.com>
      
       ## Commit message ##
     -    avformat/dump: Change precision of stream start offsets
     +    avformat/dump: Stream start offsets: change precision and label
      
     -    Changing this to 6 digits to align with other
     -    printed times
     +    - 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 <softwo...@hotmail.com>
      
     @@ 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-Time %.6fs", stream_start);
     ++        av_log(NULL, AV_LOG_INFO, ", Start %.6fs", 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 8c7db7b275..dacedd5ef1 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 %.6fs", stream_start);
     }
 
     dump_disposition(st->disposition, log_level);
@@ -883,7 +883,7 @@ 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));

base-commit: 853e66a0726b0a9d6d6269a22f6f9b5be7763738
-- 
ffmpeg-codebot
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to