projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pot/merge.
[dcpomatic.git]
/
src
/
lib
/
dcp_decoder.cc
diff --git
a/src/lib/dcp_decoder.cc
b/src/lib/dcp_decoder.cc
index 826b4e8d387ba44d709cb77bff36fe40bda318c5..19831185d16203834393335716420998b4a64e84 100644
(file)
--- 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 "image.h"
#include "config.h"
#include "digester.h"
+#include "frame_interval_checker.h"
#include <dcp/dcp.h>
#include <dcp/cpl.h>
#include <dcp/reel.h>
#include <dcp/dcp.h>
#include <dcp/cpl.h>
#include <dcp/reel.h>
@@
-125,7
+126,14
@@
DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent
bool
DCPDecoder::pass ()
{
bool
DCPDecoder::pass ()
{
- if (_reel == _reels.end () || !_dcp_content->can_be_played ()) {
+ if (!_dcp_content->can_be_played()) {
+ return true;
+ }
+
+ if (_reel == _reels.end()) {
+ if (audio) {
+ audio->flush ();
+ }
return true;
}
return true;
}
@@
-450,3
+458,9
@@
DCPDecoder::calculate_lazy_digest (shared_ptr<const DCPContent> c) const
}
return d.get ();
}
}
return d.get ();
}
+
+ContentTime
+DCPDecoder::position () const
+{
+ return ContentTime::from_frames(_offset, _dcp_content->active_video_frame_rate(film())) + _next;
+}