X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_decoder.cc;h=ab724cd6c75bbb7a5f02326e15b92f3a964a0322;hp=a3c42a321a70d824ca8d6a84497dfcec804595c9;hb=60f3f8ff110d55e0d720784dd40c9bc62d342d2c;hpb=5be0db4041bdfc469668de290e44ff5443708cf6 diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index a3c42a321..ab724cd6c 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -29,6 +29,7 @@ #include "image.h" #include "config.h" #include "digester.h" +#include "frame_interval_checker.h" #include #include #include @@ -450,10 +451,18 @@ DCPDecoder::calculate_lazy_digest (shared_ptr c) const BOOST_FOREACH (boost::filesystem::path i, c->paths()) { d.add (i.string()); } - d.add (static_cast(_dcp_content->kdm())); + if (_dcp_content->kdm()) { + d.add(_dcp_content->kdm()->id()); + } d.add (static_cast(c->cpl())); if (c->cpl()) { d.add (c->cpl().get()); } return d.get (); } + +ContentTime +DCPDecoder::position () const +{ + return ContentTime::from_frames(_offset, _dcp_content->active_video_frame_rate(film())) + _next; +}