summaryrefslogtreecommitdiff
path: root/src/lib/film_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/film_util.cc')
-rw-r--r--src/lib/film_util.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/film_util.cc b/src/lib/film_util.cc
index 34f48d5a3..d196a1ee2 100644
--- a/src/lib/film_util.cc
+++ b/src/lib/film_util.cc
@@ -32,3 +32,18 @@ channel_is_mapped(shared_ptr<const Film> film, dcp::Channel channel)
auto const mapped = film->mapped_audio_channels();
return std::find(mapped.begin(), mapped.end(), static_cast<int>(channel)) != mapped.end();
}
+
+
+int
+audio_channels_to_write_to_mxf(shared_ptr<const Film> film)
+{
+ if (film->interop()) {
+ return film->audio_channels();
+ }
+
+ /* Compromise to try and avoid validation errors in some cases with DCPs that
+ * don't have 8 or 16 channels (see bug #2443).
+ */
+ return film->audio_channels() > 8 ? 16 : 8;
+}
+