summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-06-07 01:52:13 +0100
committerCarl Hetherington <cth@carlh.net>2018-06-07 01:52:13 +0100
commit5c49ce94ecebdc1a2f3ab92da42ede75162c3df1 (patch)
tree13f1c3fb22e1bab522a6d76e30f586d20130b3f5
parentc3b35ba7e551dd2788ab17f04dace2274a832091 (diff)
Speculative fix for reel length errors when some trimmed content comes in the 2nd or subsequent reel.
-rw-r--r--src/lib/player.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 7e0186bf4..c94e0b549 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -557,7 +557,11 @@ Player::pass ()
continue;
}
- DCPTime const t = content_time_to_dcp (i, i->decoder->position());
+ /** decoder position may need to be trimmed like the
+ content (but the decoder does not know it yet);
+ check for that and fake it here if necessary.
+ */
+ DCPTime const t = content_time_to_dcp (i, min(i->decoder->position(), i->content->trim_start()));
if (t > i->content->end()) {
i->done = true;
} else {