diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-06-06 19:36:24 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-06-06 19:36:26 +0200 |
| commit | d860d9de91607aad3561e087fe83c2290ec5d42c (patch) | |
| tree | 56311538b8082903ff25e880377f9caebd2645ba /src/lib/dcp_examiner.cc | |
| parent | 606b342315995f8e5cc28f6ea13bef9858038d5f (diff) | |
Fix player audio, almost totally broken by a stupid mistakev2.16.59
in 78b2c650a9249cb7165d269b4378391d31e68e8b
Following that commit 16 channel audio streams were being read
as 6-channel, with unsurprising consequences.
Diffstat (limited to 'src/lib/dcp_examiner.cc')
| -rw-r--r-- | src/lib/dcp_examiner.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 50b19e2fd..e369b46ff 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -175,11 +175,17 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) auto asset = reel->main_sound()->asset(); if (!_audio_channels) { - _audio_channels = asset->active_channels(); - } else if (_audio_channels.get() != asset->active_channels()) { + _audio_channels = asset->channels(); + } else if (_audio_channels.get() != asset->channels()) { throw DCPError (_("Mismatched audio channel counts in DCP")); } + if (!_active_audio_channels) { + _active_audio_channels = asset->active_channels(); + } else if (_active_audio_channels.get() != asset->active_channels()) { + throw DCPError(_("Mismatched active audio channel counts in DCP")); + } + if (!_audio_frame_rate) { _audio_frame_rate = asset->sampling_rate (); } else if (_audio_frame_rate.get() != asset->sampling_rate ()) { |
