Skip to content

Commit c8accd7

Browse files
koenoejoeyparrish
authored andcommitted
fix(DASH): Fix Dolby Atmos detection (#7966)
dolby digital plus tracks can have a bandwidth of exactly 384000 Fixes #7965
1 parent e78bca3 commit c8accd7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/dash/dash_parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@ shaka.dash.DashParser = class {
21362136
const codecs = context.representation.codecs;
21372137
// Detect the presence of Dolby Atmos audio content based on the codec and
21382138
// bandwidth. Bandwidth above 384 kbps is a good indicator of Atmos content.
2139-
const isAtmos = codecs.includes('ec-3') && context.bandwidth >= 384000;
2139+
const isAtmos = codecs.includes('ec-3') && context.bandwidth > 384000;
21402140
let spatialAudio = false;
21412141
if (hasJoc || isAtmos) {
21422142
spatialAudio = true;

test/dash/dash_parser_manifest_unit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ describe('DashParser Manifest', () => {
543543
'<MPD>',
544544
' <Period duration="PT30M">',
545545
' <AdaptationSet mimeType="audio/mp4" lang="\u2603">',
546-
' <Representation bandwidth="384000" codecs="ec-3">',
546+
' <Representation bandwidth="768000" codecs="ec-3">',
547547
' <BaseURL>http://example.com</BaseURL>',
548548
' <SegmentTemplate media="2.mp4" duration="1" />',
549549
' </Representation>',

0 commit comments

Comments
 (0)