Write MainSoundConfiguration tags with hyphens for unused channels (#2501).
authorCarl Hetherington <cth@carlh.net>
Wed, 5 Apr 2023 20:05:12 +0000 (22:05 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 6 Apr 2023 19:18:23 +0000 (21:18 +0200)
cscript
src/lib/writer.cc
src/wx/verify_dcp_dialog.cc
wscript

diff --git a/cscript b/cscript
index ef74488894fe123f941fffefea3cb6d40c3d12c3..939579fbad8dadb13f355b748761b67e3878425b 100644 (file)
--- a/cscript
+++ b/cscript
@@ -477,7 +477,7 @@ def dependencies(target, options):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', 'v1.8.65'))
+    deps.append(('libdcp', 'v1.8.66'))
     deps.append(('libsub', 'v1.6.44'))
     deps.append(('leqm-nrt', '4560105773c66ac9216b62313a24093bb0a027ae'))
     deps.append(('rtaudio', 'f619b76'))
index b0bd4aaff4766c3ab27c7d859f97cd27c5988951..53b1eec5e69ea8d8d66c73c28ce927f239a2a3bf 100644 (file)
@@ -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());
 
index e297899503dedc5fdbd4622fef5b8afa821d41bb..d88a030bb40b817eb4767a8d054ca0abcb95ac23 100644 (file)
@@ -395,6 +395,12 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
                case dcp::VerificationNote::Code::INVALID_SUBTITLE_ISSUE_DATE:
                        add(i, _("<IssueDate> has an invalid value %n"));
                        break;
+               case dcp::VerificationNote::Code::MISMATCHED_SOUND_CHANNEL_COUNTS:
+                       add(i, _("Sound assets do not all have the same channel count."));
+                       break;
+               case dcp::VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION:
+                       add(i, _("<MainSoundConfiguration> describes incorrect number of channels (%n)"));
+                       break;
                }
        }
 
diff --git a/wscript b/wscript
index c3b8bc1f492e27c196f5d199e77106d6b32ce366..bbfacfd0d3f180e0b556b4f0b85568ae392a4708 100644 (file)
--- a/wscript
+++ b/wscript
@@ -35,7 +35,7 @@ except ImportError:
 from waflib import Logs, Context
 
 APPNAME = 'dcpomatic'
-libdcp_version = '1.8.55'
+libdcp_version = '1.8.66'
 libsub_version = '1.6.42'
 
 this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0]