From 5c49ce94ecebdc1a2f3ab92da42ede75162c3df1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 7 Jun 2018 01:52:13 +0100 Subject: Speculative fix for reel length errors when some trimmed content comes in the 2nd or subsequent reel. --- src/lib/player.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib') 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 { -- cgit v1.2.3