From cbec1ffccca89c4f170e318dc420c8c92dbb44af Mon Sep 17 00:00:00 2001 From: Piers O'Hanlon Date: Mon, 14 Feb 2022 15:52:55 +0000 Subject: [PATCH] Corrected ServiceDescription handling - minDrift should not be set from SD as there is no direct mapping to any SD parameters - maxDrift is set if present and larger than SD target --- src/streaming/controllers/PlaybackController.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/streaming/controllers/PlaybackController.js b/src/streaming/controllers/PlaybackController.js index e4d2a9af46..a51fc64ad7 100644 --- a/src/streaming/controllers/PlaybackController.js +++ b/src/streaming/controllers/PlaybackController.js @@ -293,14 +293,20 @@ function PlaybackController() { settings.update({ streaming: { delay: { - liveDelay: llsd.latency.target / 1000, - }, - liveCatchup: { - minDrift: (llsd.latency.target + 500) / 1000, - maxDrift: llsd.latency.max > llsd.latency.target ? (llsd.latency.max - llsd.latency.target + 500) / 1000 : undefined + liveDelay: llsd.latency.target / 1000 } } }); + if (llsd.latency.max && llsd.latency.max > llsd.latency.target ) { + logger.debug('Apply LL properties coming from service description. Max Latency:', llsd.latency.max); + settings.update({ + streaming: { + liveCatchup: { + maxDrift: (llsd.latency.max - llsd.latency.target) / 1000 + } + } + }); + } } if (llsd.playbackRate && llsd.playbackRate.max > 1.0) { logger.debug('Apply LL properties coming from service description. Max PlaybackRate:', llsd.playbackRate.max);