Move video level conversion for RGB from FFmpegImageProxy to Image.
[dcpomatic.git] / src / lib / player.cc
index 36d3fde67109ca51fe59aa8acdac8445a672b65e..0bdf46f4abe33532f2edc7f14e7ad0f29bcb219f 100644 (file)
@@ -285,9 +285,9 @@ Player::setup_pieces_unlocked ()
        _black = Empty (_film, playlist(), bind(&have_video, _1), _playback_length);
        _silent = Empty (_film, playlist(), bind(&have_audio, _1), _playback_length);
 
-       _last_video_time = {};
+       _last_video_time = boost::optional<dcpomatic::DCPTime>();
        _last_video_eyes = Eyes::BOTH;
-       _last_audio_time = {};
+       _last_audio_time = boost::optional<dcpomatic::DCPTime>();
 }
 
 
@@ -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.
        */