[FFmpeg-devel] [PATCH] ffmpeg: correct units for raw pts in -progress report

Gyan Doshi gyandoshi at gmail.com
Sun Aug 26 09:23:16 EEST 2018


On 09-08-2018 10:09 AM, Gyan Doshi wrote:
> 
> 
> On 08-08-2018 12:47 AM, Nicolas George wrote:
>> Gyan Doshi (2018-08-08):
>>> That will just defer the breaking change.
>>
>> That will leave people time to notice the change and allow old and new
>> scripts to work during the transition.
> 
> Will do it this way.

Revised patch attached.

Gyan
-------------- next part --------------
From 397591ae236cd19f2c50772ea8f7288b80705c89 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <ffmpeg at gyani.pro>
Date: Sun, 5 Aug 2018 12:34:21 +0530
Subject: [PATCH] ffmpeg: add correct field for raw pts in -progress report

PTS is in microseconds, so correct field name is out_time_us.

Old field out_time_ms kept for now - will be removed after a suitable transition
period.

Fixes #7345
---
 fftools/ffmpeg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 2459374f08..934dc71a74 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1794,9 +1794,11 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
     if (total_size < 0) av_bprintf(&buf_script, "total_size=N/A\n");
     else                av_bprintf(&buf_script, "total_size=%"PRId64"\n", total_size);
     if (pts == AV_NOPTS_VALUE) {
+        av_bprintf(&buf_script, "out_time_us=N/A\n");
         av_bprintf(&buf_script, "out_time_ms=N/A\n");
         av_bprintf(&buf_script, "out_time=N/A\n");
     } else {
+        av_bprintf(&buf_script, "out_time_us=%"PRId64"\n", pts);
         av_bprintf(&buf_script, "out_time_ms=%"PRId64"\n", pts);
         av_bprintf(&buf_script, "out_time=%s%02d:%02d:%02d.%06d\n",
                    hours_sign, hours, mins, secs, us);
-- 
2.18.0


More information about the ffmpeg-devel mailing list