From 56c5f52c9a69d87f005163f7d0def1a49d8d599d Mon Sep 17 00:00:00 2001 From: Koen Romers Date: Tue, 28 Jan 2025 12:44:12 +0000 Subject: [PATCH] fix(DASH): Fix Dolby Atmos detection (#7966) dolby digital plus tracks can have a bandwidth of exactly 384000 Fixes https://github.com/shaka-project/shaka-player/issues/7965 --- lib/dash/dash_parser.js | 2 +- test/dash/dash_parser_manifest_unit.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dash/dash_parser.js b/lib/dash/dash_parser.js index 6d39d056a8..cfa600d847 100644 --- a/lib/dash/dash_parser.js +++ b/lib/dash/dash_parser.js @@ -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; diff --git a/test/dash/dash_parser_manifest_unit.js b/test/dash/dash_parser_manifest_unit.js index 3b806acea0..60f17cfcf5 100644 --- a/test/dash/dash_parser_manifest_unit.js +++ b/test/dash/dash_parser_manifest_unit.js @@ -545,7 +545,7 @@ describe('DashParser Manifest', () => { '', ' ', ' ', - ' ', + ' ', ' http://example.com', ' ', ' ',