summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-08-09 22:28:27 +0100
committerCarl Hetherington <cth@carlh.net>2018-08-09 22:31:11 +0100
commitfcab3e1bf6c6f05ca714eb9e337ff50f13fff6a6 (patch)
tree38039409022f46f19e85ae180129f17ff75ca71e /src/lib
parente41677a322965fd964c15368de2f3e027229f361 (diff)
Fix writer assertion at the end of some 3D encodes; one too many fill frames were being emitted.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc7
1 files changed, 6 insertions, 1 deletions
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<Piece> 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<PlayerVideo> copy = last->second->shallow_copy();
copy->set_eyes (eyes);