Skip to content

Commit

Permalink
feat: Add EC-3 detection in TS (shaka-project#5144)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Apr 11, 2023
1 parent 6fd44c4 commit 24a3b7d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/hls/hls_parser.js
Expand Up @@ -873,6 +873,10 @@ shaka.hls.HlsParser = class {
codecs.push('ac-3');
hasAudio = true;
break;
case 'ec3':
codecs.push('ec-3');
hasAudio = true;
break;
}
switch (tsCodecs.video) {
case 'avc':
Expand Down
8 changes: 8 additions & 0 deletions lib/util/ts_parser.js
Expand Up @@ -274,6 +274,14 @@ shaka.util.TsParser = class {
result.audioCodec = 'ac3';
}
break;
// EC-3
case 0x84:
case 0x87:
if (result.audio == -1) {
result.audio = pid;
result.audioCodec = 'ec3';
}
break;
default:
// shaka.log.warning('Unknown stream type:', data[offset]);
break;
Expand Down

0 comments on commit 24a3b7d

Please sign in to comment.