Skip to content

Commit

Permalink
fix: Missing AES-128 key of last HLS segment
Browse files Browse the repository at this point in the history
  • Loading branch information
sunb-inflab committed Sep 27, 2022
1 parent b3621c2 commit 79c535a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Giorgio Gamberoni <[email protected]>
Giuseppe Samela <[email protected]>
Google Inc. <*@google.com>
Itay Kinnrot <[email protected]>
Jaeseok Lee <[email protected]>
Jason Palmer <[email protected]>
Jesper Haug Karsrud <[email protected]>
Johan Sundström <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Hichem Taoufik <[email protected]>
Itay Kinnrot <[email protected]>
Isaac Ramirez <[email protected]>
Jacob Trimble <[email protected]>
Jaeseok Lee <[email protected]>
Jason Palmer <[email protected]>
Jeffrey Swan <[email protected]>
Jesper Haug Karsrud <[email protected]>
Expand Down
5 changes: 4 additions & 1 deletion lib/media/segment_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,10 @@ shaka.media.SegmentIndex = class {
lastReference.partialReferences,
lastReference.tilesLayout,
lastReference.tileDuration,
lastReference.syncTime);
lastReference.syncTime,
undefined,
lastReference.hlsAes128Key,
);
}


Expand Down
11 changes: 9 additions & 2 deletions test/media/segment_index_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -955,9 +955,11 @@ describe('SegmentIndex', /** @suppress {accessControls} */ () => {
* @param {number} startTime
* @param {number} endTime
* @param {!Array.<!shaka.media.SegmentReference>=} partialReferences
* @param {!shaka.extern.HlsAes128Key} hlsAes128Key
* @return {shaka.media.SegmentReference}
*/
function makeReference(uri, startTime, endTime, partialReferences = []) {
function makeReference(uri, startTime, endTime, partialReferences = [],
hlsAes128Key = {method: 'AES-128', firstMediaSequenceNumber: 0}) {
return new shaka.media.SegmentReference(
startTime,
endTime,
Expand All @@ -968,6 +970,11 @@ describe('SegmentIndex', /** @suppress {accessControls} */ () => {
/* timestampOffset= */ 0,
/* appendWindowStart= */ 0,
/* appendWindowEnd= */ Infinity,
/* partialReferences= */ partialReferences);
/* partialReferences= */ partialReferences,
undefined,
undefined,
undefined,
undefined,
hlsAes128Key);
}
});

0 comments on commit 79c535a

Please sign in to comment.