summaryrefslogtreecommitdiff
path: root/src/lib/dcp_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-26 09:21:54 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-26 09:21:54 +0100
commita6f586564a8f596ab101639298633933a05c0d60 (patch)
treedc1f385b4fc6f1060b4893b110e81a22bc3aba2f /src/lib/dcp_decoder.cc
parentde8325fedcbfbd516d91a89be9270299dec49332 (diff)
Fix failure to display when loading old films with imported DCPs.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
-rw-r--r--src/lib/dcp_decoder.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc
index 2e3ed374a..156fba101 100644
--- a/src/lib/dcp_decoder.cc
+++ b/src/lib/dcp_decoder.cc
@@ -73,7 +73,13 @@ DCPDecoder::DCPDecoder (shared_ptr<const DCPContent> c, shared_ptr<Log> log)
}
}
- DCPOMATIC_ASSERT (cpl);
+ if (!cpl) {
+ /* No CPL found; probably an old file that doesn't specify it;
+ just use the first one.
+ */
+ cpl = cpls().front ();
+ }
+
_reels = cpl->reels ();
_reel = _reels.begin ();