X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_decoder.cc;h=7af89e84d074b3c791032b96327465068b645e11;hb=94ee305348f7d3eb548fd44ca4aa1c57645056b1;hp=340ef5d93352a882d6f43f50c70ad2dbec1215e1;hpb=da39ed1516f2463f8a9bf4795a94f23d420c9ca3;p=dcpomatic.git diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 340ef5d93..7af89e84d 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -106,7 +106,14 @@ DCPDecoder::DCPDecoder (shared_ptr film, shared_ptrcan_be_played ()) { + if (!_dcp_content->can_be_played()) { + return true; + } + + if (_reel == _reels.end()) { + if (audio) { + audio->flush (); + } return true; } @@ -408,3 +415,9 @@ DCPDecoder::set_forced_reduction (optional reduction) { _forced_reduction = reduction; } + +ContentTime +DCPDecoder::position () const +{ + return ContentTime::from_frames(_offset, _dcp_content->active_video_frame_rate(film())) + _next; +}