diff mbox

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

Message ID bdfe709b-57a9-ff1c-bba5-7fecc67e71d7@gmail.com
State Accepted
Commit 26dc76324564fc572689509c2efb7f1cb8f41a45
Headers show

Commit Message

Gyan Aug. 26, 2018, 6:23 a.m. UTC
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
From 397591ae236cd19f2c50772ea8f7288b80705c89 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <ffmpeg@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(+)

Comments

Gyan Aug. 27, 2018, 6:34 p.m. UTC | #1
On 26-08-2018 11:53 AM, Gyan Doshi wrote:
> 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.

Plan to push in the morning.

Gyan
Michael Niedermayer Aug. 27, 2018, 7:59 p.m. UTC | #2
On Sun, Aug 26, 2018 at 11:53:16AM +0530, Gyan Doshi wrote:
> 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

>  ffmpeg.c |    2 ++
>  1 file changed, 2 insertions(+)
> cfd96a95728f4dd9c873985b872be949b0495aea  0001-ffmpeg-add-correct-field-for-raw-pts-in-progress-rep.patch
> From 397591ae236cd19f2c50772ea8f7288b80705c89 Mon Sep 17 00:00:00 2001
> From: Gyan Doshi <ffmpeg@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(+)

LGTM

thanks

PS: these fields seem not documented anywhere, neither the new nor the old or
iam looking at the wrong places

[...]
Gyan Aug. 28, 2018, 5:13 a.m. UTC | #3
On 28-08-2018 01:29 AM, Michael Niedermayer wrote:
> 
> LGTM
> 
> thanks
> 
> PS: these fields seem not documented anywhere, neither the new nor the old or
> iam looking at the wrong places

Will add documentation.

This patch pushed as 26dc76324564fc572689509c2efb7f1cb8f41a45


Thanks,
Gyan
diff mbox

Patch

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);