Skip to content

Commit

Permalink
fix: Add LOAS-AAC detection in TS (#6390)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Apr 2, 2024
1 parent 3ba7492 commit 535d386
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/media/segment_utils.js
Expand Up @@ -57,6 +57,7 @@ shaka.media.SegmentUtils = class {
let hasVideo = false;
switch (tsCodecs.audio) {
case 'aac':
case 'aac-loas':
codecs.push('mp4a.40.2');
hasAudio = true;
break;
Expand Down
7 changes: 7 additions & 0 deletions lib/util/ts_parser.js
Expand Up @@ -318,6 +318,13 @@ shaka.util.TsParser = class {
result.audioCodec = 'aac';
}
break;
// LOAS/LATM AAC
case 0x11:
if (result.audio == -1) {
result.audio = pid;
result.audioCodec = 'aac-loas';
}
break;
// Packetized metadata (ID3)
case 0x15:
if (result.id3 == -1) {
Expand Down

0 comments on commit 535d386

Please sign in to comment.