Fix failure to display when loading old films with imported DCPs.
authorCarl Hetherington <cth@carlh.net>
Fri, 26 Aug 2016 08:21:54 +0000 (09:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 26 Aug 2016 08:21:54 +0000 (09:21 +0100)
src/lib/dcp_decoder.cc

index 2e3ed374aaa8c07ef9dffe276ca40ab297aa78cd..156fba1017760629a2308db044d7f2f401b304b8 100644 (file)
@@ -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 ();