From: Carl Hetherington Date: Tue, 17 Apr 2018 14:50:03 +0000 (+0100) Subject: When seeking to the start of some content, take trim into account X-Git-Tag: v2.12.5~5 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=9594328ff78c3a9489830a2e114465cbe4f849bc When seeking to the start of some content, take trim into account so that we don't have to run through the whole of the trimmed portion to get to the data we want. --- diff --git a/src/lib/player.cc b/src/lib/player.cc index 7e2f8ad08..148e0a3c5 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -959,8 +959,8 @@ Player::seek (DCPTime time, bool accurate) BOOST_FOREACH (shared_ptr i, _pieces) { if (time < i->content->position()) { - /* Before; seek to 0 */ - i->decoder->seek (ContentTime(), accurate); + /* Before; seek to the start of the content */ + i->decoder->seek (dcp_to_content_time (i, i->content->position()), accurate); i->done = false; } else if (i->content->position() <= time && time < i->content->end()) { /* During; seek to position */