X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fempty.cc;h=206acfdb0a67d62131bb11c688906e68f01b49e2;hp=1e6e1c3fb51d21e76b1d7f2c8b058bb97040a2e1;hb=1befa3d286a5016e897f1a23cc60cd3d3b96e63a;hpb=1938b1b08d38fc199717d1875a61ef05e5b965de diff --git a/src/lib/empty.cc b/src/lib/empty.cc index 1e6e1c3fb..206acfdb0 100644 --- a/src/lib/empty.cc +++ b/src/lib/empty.cc @@ -34,17 +34,18 @@ using std::list; using boost::shared_ptr; using boost::dynamic_pointer_cast; using boost::function; +using namespace dcpomatic; -Empty::Empty (list > pieces, DCPTime length, function)> part) +Empty::Empty (shared_ptr film, list > pieces, function)> part) { list full; BOOST_FOREACH (shared_ptr i, pieces) { if (part(i)) { - full.push_back (DCPTimePeriod (i->content->position(), i->content->end())); + full.push_back (DCPTimePeriod (i->content->position(), i->content->end(film))); } } - _periods = subtract (DCPTimePeriod(DCPTime(), length), coalesce(full)); + _periods = subtract (DCPTimePeriod(DCPTime(), film->length()), coalesce(full)); if (!_periods.empty ()) { _position = _periods.front().from;