From f6c3a2095c1af106da9ea601690cf4ea1fc715c2 Mon Sep 17 00:00:00 2001 From: Krystian Kuczek Date: Mon, 19 Oct 2020 11:37:24 +0200 Subject: [PATCH 1/3] Sample AES decryption with 48 AVC Closes: #3102 (cherry picked from commit 693a6048bbe197c2e1e4d940b72a83450125e2dc) --- src/demux/sample-aes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/demux/sample-aes.js b/src/demux/sample-aes.js index 47a96544f5a..ab808addafd 100644 --- a/src/demux/sample-aes.js +++ b/src/demux/sample-aes.js @@ -105,7 +105,7 @@ class SampleAesDecrypter { } let curUnit = curUnits[unitIndex]; - if (curUnit.length <= 48 || (curUnit.type !== 1 && curUnit.type !== 5)) { + if (curUnit.data.length <= 48 || (curUnit.type !== 1 && curUnit.type !== 5)) { continue; } From 1b514110f19e67b30c44e1bca3a4a213d71900ac Mon Sep 17 00:00:00 2001 From: drew harris Date: Fri, 16 Oct 2020 10:40:25 -0700 Subject: [PATCH 2/3] on level load, check current level details as well as new when determining live-ness (cherry picked from commit 7e12f2a8eb01f8d70ad2bbbe45c9614befcacfdc) --- src/controller/stream-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/stream-controller.js b/src/controller/stream-controller.js index 7755122a266..d3be065a202 100644 --- a/src/controller/stream-controller.js +++ b/src/controller/stream-controller.js @@ -784,7 +784,7 @@ class StreamController extends BaseStreamController { logger.log(`level ${newLevelId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`); - if (newDetails.live) { + if (newDetails.live || (curLevel.details && curLevel.details.live)) { let curDetails = curLevel.details; if (curDetails && newDetails.fragments.length > 0) { // we already have details for that level, merge them From caa633f5578f8003327b355cbac5325b04be38e2 Mon Sep 17 00:00:00 2001 From: drew harris Date: Mon, 19 Oct 2020 12:26:38 -0700 Subject: [PATCH 3/3] when audio level loaded, check if we already know that it's live (cherry picked from commit 24309ed893a9c25cb991d68caeda82f59a9b1ae5) --- src/controller/audio-stream-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/audio-stream-controller.js b/src/controller/audio-stream-controller.js index 524137783d6..cd9999813e7 100644 --- a/src/controller/audio-stream-controller.js +++ b/src/controller/audio-stream-controller.js @@ -417,13 +417,13 @@ class AudioStreamController extends BaseStreamController { let newDetails = data.details, trackId = data.id, track = this.tracks[trackId], + curDetails = track.details, duration = newDetails.totalduration, sliding = 0; logger.log(`track ${trackId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`); - if (newDetails.live) { - let curDetails = track.details; + if (newDetails.live || (curDetails && curDetails.live)) { if (curDetails && newDetails.fragments.length > 0) { // we already have details for that level, merge them LevelHelper.mergeDetails(curDetails, newDetails);