From fcab3e1bf6c6f05ca714eb9e337ff50f13fff6a6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 9 Aug 2018 22:28:27 +0100 Subject: Fix writer assertion at the end of some 3D encodes; one too many fill frames were being emitted. --- src/lib/player.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/player.cc b/src/lib/player.cc index 2313e09e5..5e42d8e37 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -793,12 +793,17 @@ Player::video (weak_ptr wp, ContentVideo video) DCPTime fill_from = max (*_last_video_time, piece->content->position()); LastVideoMap::const_iterator last = _last_video.find (wp); if (_film->three_d()) { + Eyes fill_to_eyes = video.eyes; + if (fill_to == piece->content->end()) { + /* Don't fill after the end of the content */ + fill_to_eyes = EYES_LEFT; + } DCPTime j = fill_from; Eyes eyes = _last_video_eyes.get_value_or(EYES_LEFT); if (eyes == EYES_BOTH) { eyes = EYES_LEFT; } - while (j < fill_to || eyes != video.eyes) { + while (j < fill_to || eyes != fill_to_eyes) { if (last != _last_video.end()) { shared_ptr copy = last->second->shallow_copy(); copy->set_eyes (eyes); -- cgit v1.2.3