[FFmpeg-devel] [PATCH] ffmpeg: add 100ms delay for first stats

Gyan Doshi ffmpeg at gyani.pro
Wed Dec 23 11:07:18 EET 2020



On 23-12-2020 10:28 am, Gyan Doshi wrote:
> Avoids breaking output file dump report.
> ---
>   fftools/ffmpeg.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index 2c0820aacf..449da484d9 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -1699,7 +1699,8 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
>           if (last_time == -1) {
>               last_time = cur_time;
>           }
> -        if ((cur_time - last_time) < stats_period && !first_report)
> +        if (((cur_time - last_time) < stats_period && !first_report) ||
> +            ((cur_time - last_time) < 100000 && first_report))
>               return;
>           last_time = cur_time;
>       }

Looks fixed here. Can anyone else do a quick check?

Thanks,
Gyan


More information about the ffmpeg-devel mailing list