Fix crash now that some audio channels are definitely unused.
authorCarl Hetherington <cth@carlh.net>
Wed, 23 Sep 2020 18:16:12 +0000 (20:16 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 23 Sep 2020 20:34:46 +0000 (22:34 +0200)
cscript
src/lib/audio_mapping.cc

diff --git a/cscript b/cscript
index 2f699d908d206de01ff2f188b76f84cb856c626f..ed8e84d58b67a2f01498c90efdb469062997f363 100644 (file)
--- a/cscript
+++ b/cscript
@@ -375,8 +375,8 @@ def dependencies(target, options):
             (target.platform == 'osx' and target.bits == 64) or
             (target.platform == 'windows')) else {}
 
-    deps.append(('libdcp', 'e40f5c5', cpp_lib_options))
-    deps.append(('libsub', '4bc0e7e', cpp_lib_options))
+    deps.append(('libdcp', '38864bb', cpp_lib_options))
+    deps.append(('libsub', '308476c', cpp_lib_options))
     deps.append(('leqm-nrt', 'carl'))
     deps.append(('rtaudio', 'carl'))
     # We get our OpenSSL libraries from the environment, but we
index 94efbe49bff57a416e87dcc284d6d3a11d6df7e7..40dc4ebfa5bc042542a1cb9b112404c863e9c6ef 100644 (file)
@@ -237,7 +237,7 @@ AudioMapping::mapped_output_channels () const
        list<int> mapped;
 
        for (vector<vector<float> >::const_iterator i = _gain.begin(); i != _gain.end(); ++i) {
-               for (size_t j = 0; j < i->size(); ++j) {
+               BOOST_FOREACH (dcp::Channel j, dcp::used_audio_channels()) {
                        if (abs ((*i)[j]) > minus_96_db) {
                                mapped.push_back (j);
                        }