summaryrefslogtreecommitdiff
path: root/src/verify.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-01-14 23:50:38 +0100
committerCarl Hetherington <cth@carlh.net>2025-01-19 22:48:28 +0100
commiteb28997f188c905af40054e4139251ebf1756ae4 (patch)
tree91214593633d2a391587e46e2f2375d2fc47ad3b /src/verify.cc
parentd4024848dfe293b06440d20a9f48894b2b008316 (diff)
Make MainSoundConfiguration behave "correctly" with badly-formatted strings.
Add some documentation for a design "principle" when handling malformatted data, and make MainSoundConfiguration adhere to that.
Diffstat (limited to 'src/verify.cc')
-rw-r--r--src/verify.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 8775ab11..8d33bc0b 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1641,7 +1641,7 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
if (context.dcp->standard() == Standard::SMPTE) {
if (auto msc = cpl->main_sound_configuration()) {
- if (context.audio_channels && msc->channels() != *context.audio_channels) {
+ if (msc->valid() && context.audio_channels && msc->channels() != *context.audio_channels) {
context.error(
VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION,
String::compose("MainSoundConfiguration has %1 channels but sound assets have %2", msc->channels(), *context.audio_channels),