From 8e9af7f65f4cbc1bb0eb5811d36292da9588ff53 Mon Sep 17 00:00:00 2001 From: jonathan Date: Mon, 31 May 2021 18:03:00 +0200 Subject: [PATCH] add rounding to duration --- ffplayout/playlist.py | 1 + ffplayout/utils.py | 1 + 2 files changed, 2 insertions(+) diff --git a/ffplayout/playlist.py b/ffplayout/playlist.py index 117c8198..96cc712b 100644 --- a/ffplayout/playlist.py +++ b/ffplayout/playlist.py @@ -46,6 +46,7 @@ def handle_list_init(node): delta, total_delta = get_delta(node['begin']) seek = abs(delta) + node['seek'] if abs(delta) + node['seek'] >= 1 else 0 + seek = round(seek, 3) if node['out'] - seek > total_delta: out = total_delta + seek diff --git a/ffplayout/utils.py b/ffplayout/utils.py index e5306b28..1db4c943 100644 --- a/ffplayout/utils.py +++ b/ffplayout/utils.py @@ -853,6 +853,7 @@ def gen_dummy(duration): generate a dummy clip, with black color and empty audio track """ color = '#121212' + duration = round(duration, 3) # IDEA: add noise could be an config option # noise = 'noise=alls=50:allf=t+u,hue=s=0' return [