diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-02-18 00:33:26 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-02-18 00:34:30 +0000 |
| commit | bae5624269ccb69ca35df286421942dfa42a8ef8 (patch) | |
| tree | 690479fa19a489a3e8493673fda12dfd7dcc1513 /src | |
| parent | 840a313db32056549f3730af4b0089755bb5b753 (diff) | |
Set up seek position correctly when a seek skips over a reel in
a DCP.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 2ffe11065..b49081dfe 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -271,7 +271,9 @@ DCPDecoder::seek (ContentTime t, bool accurate) /* Seek to pre-roll position */ while (_reel != _reels.end() && pre >= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->active_video_frame_rate ())) { - pre -= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->active_video_frame_rate ()); + ContentTime rd = ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->active_video_frame_rate ()); + pre -= rd; + t -= rd; next_reel (); } |
