summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-03-25 00:22:16 +0000
committerCarl Hetherington <cth@carlh.net>2015-03-25 00:22:16 +0000
commitb6e388dc3ea1ab37711f50bbc28a93f48de98db3 (patch)
tree85f151006aa1fc151d39b89671b155bc97077531 /src/lib
parent5f6d9c16df8e0b49160353354dccbcbdd1e57e9d (diff)
Hand-apply ec3e6abf817b84d589f0782b01f5059dd3bf0953; only allow even
DCP audio channel counts between 2 and 16 inclusive.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/film.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 0b48bf7b1..ed7d4cb51 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -437,6 +437,14 @@ Film::read_metadata ()
_signed = f.optional_bool_child("Signed").get_value_or (true);
_encrypted = f.bool_child ("Encrypted");
_audio_channels = f.number_child<int> ("AudioChannels");
+ /* We used to allow odd numbers (and zero) channels, but it's just not worth
+ the pain.
+ */
+ if (_audio_channels == 0) {
+ _audio_channels = 2;
+ } else if ((_audio_channels % 2) == 1) {
+ _audio_channels++;
+ }
_sequence_video = f.bool_child ("SequenceVideo");
_three_d = f.bool_child ("ThreeD");
_interop = f.bool_child ("Interop");