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:33:26 +0000 |
| commit | 19eef2cafc28a485d18145392977e3ad650569fe (patch) | |
| tree | 5c191c6e522cfdfc7521750965c3ce58f6dd95e4 /src/lib/dcp_decoder.cc | |
| parent | 2a434c744338ff23ca99e21a130afaf042300ada (diff) | |
Set up seek position correctly when a seek skips over a reel in
a DCP.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
| -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 (); } |
