From ded3fd5f1c08587932f1dbda9352e5ae4b85e4cf Mon Sep 17 00:00:00 2001 From: jonathan Date: Mon, 21 Jun 2021 14:57:00 +0200 Subject: [PATCH] hard coded stop on error. for old behavior set stop_threshold to 0 --- ffplayout.yml | 5 ++--- ffplayout/utils.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ffplayout.yml b/ffplayout.yml index b34b985c..5fdb389e 100644 --- a/ffplayout.yml +++ b/ffplayout.yml @@ -1,11 +1,10 @@ general: helptext: Sometimes it can happen, that a file is corrupt but still playable, this can produce an streaming error over all following files. The only way - in this case is, to stop ffplayout and start it again here we only say it - can stop, the starting process is in your hand. Best way is a systemd serivce + in this case is, to stop ffplayout and start it again. Here we only say when + it stops, the starting process is in your hand. Best way is a systemd serivce on linux. 'stop_threshold' stop ffplayout, if it is async in time above this value. - stop_on_error: True stop_threshold: 11 mail: diff --git a/ffplayout/utils.py b/ffplayout/utils.py index d9fd4073..3d6d373c 100644 --- a/ffplayout/utils.py +++ b/ffplayout/utils.py @@ -182,8 +182,7 @@ def load_config(): cfg = read_config() - sync_op.stop = cfg['general']['stop_on_error'] - sync_op.threshold = cfg['general']['stop_threshold'] + sync_op.threshold = int(cfg['general']['stop_threshold']) mail.subject = cfg['mail']['subject'] mail.server = cfg['mail']['smpt_server'] @@ -814,7 +813,7 @@ def check_sync(delta): # this is needed for real time filter sync_op.time_delta = delta - if sync_op.stop and abs(delta) > sync_op.threshold: + if abs(delta) > sync_op.threshold > 0: messenger.error( f'Sync tolerance value exceeded with {delta:.2f} seconds,\n' 'program terminated!')