diff --git a/src/streaming/StreamProcessor.js b/src/streaming/StreamProcessor.js index b2abe01e90..1771a62e88 100644 --- a/src/streaming/StreamProcessor.js +++ b/src/streaming/StreamProcessor.js @@ -660,7 +660,7 @@ function StreamProcessor(config) { function _prepareForFastQualitySwitch(representationInfo) { // if we switch up in quality and need to replace existing parts in the buffer we need to adjust the buffer target const time = playbackController.getTime(); - let safeBufferLevel = 1.5; + let safeBufferLevel = 1.5 * (!isNaN(representationInfo.fragmentDuration) ? representationInfo.fragmentDuration : 1); const request = fragmentModel.getRequests({ state: FragmentModel.FRAGMENT_MODEL_EXECUTED, time: time + safeBufferLevel,