diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-01-02 21:21:43 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-01-02 21:21:43 +0000 |
| commit | 65c3b3a815545fef4d0373bb588eb815b8b544b0 (patch) | |
| tree | e9a96f5d96fbb740fa939948a628e193bdc1a347 /src/lib | |
| parent | 2537a2d959a5872c2e75b322022a7679d24c7e60 (diff) | |
Mark pieces as done when we're past the end of them; fixes #1154.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 9e0561a70..df0b955a8 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -526,8 +526,14 @@ Player::pass () optional<DCPTime> earliest_time; BOOST_FOREACH (shared_ptr<Piece> i, _pieces) { - if (!i->done) { - DCPTime const t = content_time_to_dcp (i, i->decoder->position()); + if (i->done) { + continue; + } + + DCPTime const t = content_time_to_dcp (i, i->decoder->position()); + if (t > i->content->end()) { + i->done = true; + } else { /* Given two choices at the same time, pick the one with a subtitle so we see it before the video. */ |
