Fix confusion over when DCPDecoder::_next means wrt reels.
authorCarl Hetherington <cth@carlh.net>
Tue, 3 Nov 2015 09:44:25 +0000 (09:44 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 3 Nov 2015 09:44:25 +0000 (09:44 +0000)
ChangeLog
src/lib/dcp_decoder.cc
src/lib/dcp_decoder.h

index 884886c56b0a303e040e19b33ca1be993b3f7f4c..47e8d1c7a4c5751cfd2353b55d4a8abf7bd6a2c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-11-03  Carl Hetherington  <cth@carlh.net>
 
+       * Fix crash with multi-reel DCP content.
+
        * Updated fr_FR translation from Thierry Journet.
 
        * Updated ru_RU translation from Igor Voytovich.
index 04fffb9816f9642eb22a2bea1e09fb2adfbdfbb1..c968259b3d5ae6d400ea8d3365a63986df1a6f25 100644 (file)
@@ -131,6 +131,7 @@ DCPDecoder::pass (PassReason reason, bool)
        if ((*_reel)->main_picture ()) {
                if (_next.frames_round (vfr) >= (*_reel)->main_picture()->duration()) {
                        ++_reel;
+                       _next = ContentTime ();
                }
        }
 
index 0db707160b88e6a9a736136e5b4f983fd5086771..32d334ec1530e45551f45639ddf63f25d30c0202 100644 (file)
@@ -50,6 +50,7 @@ private:
        std::list<ContentTimePeriod> image_subtitles_during (ContentTimePeriod, bool starting) const;
        std::list<ContentTimePeriod> text_subtitles_during (ContentTimePeriod, bool starting) const;
 
+       /** Time of next thing to return from pass relative to the start of _reel */
        ContentTime _next;
        std::list<boost::shared_ptr<dcp::Reel> > _reels;
        std::list<boost::shared_ptr<dcp::Reel> >::iterator _reel;