diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-04-15 16:17:01 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-04-15 16:17:01 +0200 |
| commit | 4219d4b76c5cd5690b1f4fa0c248d93ced26d05a (patch) | |
| tree | 6266573a3a26dd9f432d6bd096a2c6bbd85bf6c4 /src/lib/empty.cc | |
| parent | 39dcdd18487d5d1e20f0343fe617ed5bf44c1387 (diff) | |
Fix length of player output so it can be either the film's length or playlist's length, as appropriate.
Diffstat (limited to 'src/lib/empty.cc')
| -rw-r--r-- | src/lib/empty.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/empty.cc b/src/lib/empty.cc index 71bf3aa95..c145c231b 100644 --- a/src/lib/empty.cc +++ b/src/lib/empty.cc @@ -36,7 +36,7 @@ using boost::dynamic_pointer_cast; using boost::function; using namespace dcpomatic; -Empty::Empty (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist, function<bool (shared_ptr<const Content>)> part) +Empty::Empty (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist, function<bool (shared_ptr<const Content>)> part, DCPTime length) { list<DCPTimePeriod> full; BOOST_FOREACH (shared_ptr<Content> i, playlist->content()) { @@ -45,7 +45,7 @@ Empty::Empty (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist, } } - _periods = subtract (DCPTimePeriod(DCPTime(), playlist->length(film)), coalesce(full)); + _periods = subtract (DCPTimePeriod(DCPTime(), length), coalesce(full)); if (!_periods.empty ()) { _position = _periods.front().from; |
