From e18e0a45f8938bf483e9bf6a7f2da3582fdc389f Mon Sep 17 00:00:00 2001 From: Daniel Silhavy Date: Thu, 27 May 2021 21:14:25 +0200 Subject: [PATCH] Abort requests when deactivating a stream --- src/streaming/Stream.js | 1 + src/streaming/controllers/AbrController.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/streaming/Stream.js b/src/streaming/Stream.js index 677f12ff67..5d897cd175 100644 --- a/src/streaming/Stream.js +++ b/src/streaming/Stream.js @@ -489,6 +489,7 @@ function Stream(config) { const errored = false; for (let i = 0; i < ln; i++) { let fragmentModel = streamProcessors[i].getFragmentModel(); + fragmentModel.abortRequests(); fragmentModel.resetInitialSettings(); streamProcessors[i].reset(errored, keepBuffers); } diff --git a/src/streaming/controllers/AbrController.js b/src/streaming/controllers/AbrController.js index 88565e87a6..4201b135af 100644 --- a/src/streaming/controllers/AbrController.js +++ b/src/streaming/controllers/AbrController.js @@ -710,7 +710,7 @@ function AbrController() { if (type && streamProcessorDict[streamId] && streamProcessorDict[streamId][type]) { const streamInfo = streamProcessorDict[streamId][type].getStreamInfo(); const bufferLevel = dashMetrics.getCurrentBufferLevel(type); - logger.info('[' + type + '] switch from ' + oldQuality + ' to ' + newQuality + '/' + maxIdx + ' (buffer: ' + bufferLevel + ') ' + (reason ? JSON.stringify(reason) : '.')); + logger.info('Stream ID: ' + streamId + ' [' + type + '] switch from ' + oldQuality + ' to ' + newQuality + '/' + maxIdx + ' (buffer: ' + bufferLevel + ') ' + (reason ? JSON.stringify(reason) : '.')); qualityDict[streamId] = qualityDict[streamId] || {}; qualityDict[streamId][type] = newQuality;