Skip to content

Commit

Permalink
fix(DASH): Fix Dolby Atmos detection (#7966)
Browse files Browse the repository at this point in the history
dolby digital plus tracks can have a bandwidth of exactly 384000

Fixes #7965
  • Loading branch information
koenoe authored Jan 28, 2025
1 parent a0ed8da commit 56c5f52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dash/dash_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ shaka.dash.DashParser = class {
const codecs = context.representation.codecs;
// Detect the presence of Dolby Atmos audio content based on the codec and
// bandwidth. Bandwidth above 384 kbps is a good indicator of Atmos content.
const isAtmos = codecs.includes('ec-3') && context.bandwidth >= 384000;
const isAtmos = codecs.includes('ec-3') && context.bandwidth > 384000;
let spatialAudio = false;
if (hasJoc || isAtmos) {
spatialAudio = true;
Expand Down
2 changes: 1 addition & 1 deletion test/dash/dash_parser_manifest_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ describe('DashParser Manifest', () => {
'<MPD>',
' <Period duration="PT30M">',
' <AdaptationSet mimeType="audio/mp4" lang="\u2603">',
' <Representation bandwidth="384000" codecs="ec-3">',
' <Representation bandwidth="768000" codecs="ec-3">',
' <BaseURL>http://example.com</BaseURL>',
' <SegmentTemplate media="2.mp4" duration="1" />',
' </Representation>',
Expand Down

0 comments on commit 56c5f52

Please sign in to comment.