Fix seek through multi-reel DCP imports.
authorCarl Hetherington <cth@carlh.net>
Tue, 16 Aug 2016 13:30:53 +0000 (14:30 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Aug 2016 13:30:53 +0000 (14:30 +0100)
ChangeLog
src/lib/dcp_decoder.cc

index 2440e7b90b9aba7836ff466aea089c45bf1bb5b5..c6d270897aa91a3c7d25c94050893851e36a8b37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2016-08-16  c.hetherington  <cth@carlh.net>
 
+       * Fix error on seeking through imported mulit-reel DCPs.
+
        * Simple information on mouse position in the video waveform (part of #932).
 
 2016-08-15  Carl Hetherington  <cth@carlh.net>
index 283cb29054ab900c0abc9881abccce032f6a05a9..a4207f14441c513f3700bcc0b8f5a77df8140de8 100644 (file)
@@ -216,8 +216,10 @@ DCPDecoder::seek (ContentTime t, bool accurate)
        audio->seek (t, accurate);
        subtitle->seek (t, accurate);
 
-       _offset = 0;
        _reel = _reels.begin ();
+       _offset = 0;
+       get_readers ();
+
        while (_reel != _reels.end() && t >= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->active_video_frame_rate ())) {
                t -= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->active_video_frame_rate ());
                next_reel ();