diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-04-05 22:05:12 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-04-06 21:18:23 +0200 |
| commit | 08c2f6d80873f41c063c71588e781c9e6c3179e9 (patch) | |
| tree | 52652f484ce4e69fd2bfdb4c648b2d127e7008f8 /src/lib | |
| parent | 577602f032c0a129612efc8015f846f4bf6e64c9 (diff) | |
Write MainSoundConfiguration tags with hyphens for unused channels (#2501).
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/writer.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index b0bd4aaff..53b1eec5e 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -23,6 +23,7 @@ #include "audio_mapping.h" #include "compose.hpp" #include "config.h" +#include "constants.h" #include "cross.h" #include "dcp_content_type.h" #include "dcp_video.h" @@ -651,14 +652,12 @@ Writer::finish (boost::filesystem::path output_dcp) field = dcp::MCASoundField::SEVEN_POINT_ONE; } - dcp::MainSoundConfiguration msc (field, film()->audio_channels()); + dcp::MainSoundConfiguration msc(field, MAX_DCP_AUDIO_CHANNELS); for (auto i: film()->mapped_audio_channels()) { - if (static_cast<int>(i) < film()->audio_channels()) { - msc.set_mapping (i, static_cast<dcp::Channel>(i)); - } + msc.set_mapping(i, static_cast<dcp::Channel>(i)); } - cpl->set_main_sound_configuration (msc.to_string()); + cpl->set_main_sound_configuration(msc); cpl->set_main_sound_sample_rate (film()->audio_frame_rate()); cpl->set_main_picture_stored_area (film()->frame_size()); |
