diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-24 00:54:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-24 00:54:52 +0100 |
| commit | c89ed445b9fcd4d6c76cbf3278dd2d7d7e2e0a42 (patch) | |
| tree | 108c1ef1e67b6bc2d0d9e55d4a7cfbf1f765ad89 /src | |
| parent | b489c7ad24303799a32412e160fe27c4e9eddb29 (diff) | |
Only write the appropriate number of AudioChannelLabelSubDescriptors (DoM #2431).v1.8.54
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -512,6 +512,9 @@ CPL::maybe_write_composition_metadata_asset (xmlpp::Element* node) const for (auto i: channels) { auto channel = reinterpret_cast<ASDCP::MXF::AudioChannelLabelSubDescriptor*>(i); + if (static_cast<int>(channel->MCAChannelID) > asset->channels()) { + continue; + } auto ch = mca_subs->add_child("AudioChannelLabelSubDescriptor", "r0"); channel->InstanceUID.EncodeString(buffer, sizeof(buffer)); ch->add_child("InstanceID", "r1")->add_child_text("urn:uuid:" + string(buffer)); |
