summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-01 01:25:27 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-01 01:25:27 +0200
commit981ffdc9db4a84c614b3186a0fb27136fe6feb37 (patch)
tree9027b208a4eaeccd8a2e8ff3af375d49976f7915 /src/lib/player.cc
parent0a1aa72f11b7d5109caaa5d3ae0068e18dea6b56 (diff)
Move 3D-to-2D check (#1941).
We were checking for 3D content going into a 2D project in the DCPEncoder, but we also need to do the same thing when exporting. Moving the check into Player::emit_video() means that it is applied to both DCP transcoding and export.
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index a5538d9a6..0bdf46f4a 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -1199,6 +1199,16 @@ Player::seek (DCPTime time, bool accurate)
void
Player::emit_video (shared_ptr<PlayerVideo> pv, DCPTime time)
{
+ if (!_film->three_d()) {
+ if (pv->eyes() == Eyes::LEFT) {
+ /* Use left-eye images for both eyes... */
+ pv->set_eyes (Eyes::BOTH);
+ } else if (pv->eyes() == Eyes::RIGHT) {
+ /* ...and discard the right */
+ return;
+ }
+ }
+
/* We need a delay to give a little wiggle room to ensure that relevent subtitles arrive at the
player before the video that requires them.
*/