From 377428d8f098655d5cfbe3efef5ab95b325394fe Mon Sep 17 00:00:00 2001 From: Daniel Silhavy Date: Fri, 18 Jun 2021 12:37:36 +0200 Subject: [PATCH] Fix a bug in the TimeSyncController.js which causes time syncs to be blocked once the sync attempt failed --- src/dash/utils/TimelineConverter.js | 2 +- src/streaming/controllers/TimeSyncController.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dash/utils/TimelineConverter.js b/src/dash/utils/TimelineConverter.js index cc60612ae1..0848d07384 100644 --- a/src/dash/utils/TimelineConverter.js +++ b/src/dash/utils/TimelineConverter.js @@ -341,7 +341,7 @@ function TimelineConverter() { } function _onUpdateTimeSyncOffset(e) { - if (e.offset !== undefined) { + if (e.offset !== undefined && !isNaN(e.offset)) { setClientTimeOffset(e.offset / 1000); } } diff --git a/src/streaming/controllers/TimeSyncController.js b/src/streaming/controllers/TimeSyncController.js index 798d349098..f300a4e4ab 100644 --- a/src/streaming/controllers/TimeSyncController.js +++ b/src/streaming/controllers/TimeSyncController.js @@ -547,6 +547,7 @@ function TimeSyncController() { if (failed) { lastTimingSource = null; + isSynchronizing = false; errHandler.error(new DashJSError(Errors.TIME_SYNC_FAILED_ERROR_CODE, Errors.TIME_SYNC_FAILED_ERROR_MESSAGE)); }