From 267169c5bcc2bcab7dff54f2a9528ae5f0d6ab2a Mon Sep 17 00:00:00 2001 From: Julian Domingo Date: Mon, 12 Feb 2024 10:00:44 -0800 Subject: [PATCH] fix: do not remove sub-second amounts from source buffer Partial cherry-pick of #6242 Increases the default required removal duration from `0.01` => `1.0`. Closes #6240 --- lib/media/streaming_engine.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/media/streaming_engine.js b/lib/media/streaming_engine.js index 5670056a12..091a49d0f1 100644 --- a/lib/media/streaming_engine.js +++ b/lib/media/streaming_engine.js @@ -2016,8 +2016,8 @@ shaka.media.StreamingEngine = class { const bufferedBehind = presentationTime - startTime; const overflow = bufferedBehind - bufferBehind; - // See: https://github.com/shaka-project/shaka-player/issues/2982 - if (overflow <= 0.01) { + // See: https://github.com/shaka-project/shaka-player/issues/6240 + if (overflow <= 1) { shaka.log.v2(logPrefix, 'buffer behind okay:', 'presentationTime=' + presentationTime,