Move some checks from Player to Piece.
[dcpomatic.git] / src / lib / player.cc
index 35a08629eceeb3d5f02bd2181462119f6ab7ae6d..6261b200afe6b8e3d1fc007ad8cc01b390ebb928 100644 (file)
@@ -812,15 +812,6 @@ Player::video (weak_ptr<Piece> wp, PieceVideo video)
                return;
        }
 
-       if (!piece->use_video()) {
-               return;
-       }
-
-       auto frc = piece->frame_rate_change();
-       if (frc.skip && (video.frame % 2) == 1) {
-               return;
-       }
-
        LOG_DEBUG_PLAYER("Received video frame %1 at %2", video.frame, to_string(video.time));
 
        /* Discard if it's before the content's period or the last accurate seek.  We can't discard
@@ -831,10 +822,6 @@ Player::video (weak_ptr<Piece> wp, PieceVideo video)
                return;
        }
 
-       if (piece->ignore_video_at(video.time)) {
-               return;
-       }
-
        /* Fill gaps that we discover now that we have some video which needs to be emitted.
           This is where we need to fill to.
        */
@@ -890,6 +877,7 @@ Player::video (weak_ptr<Piece> wp, PieceVideo video)
        _last_video[wp] = piece->player_video (video, _video_container_size);
 
        DCPTime t = video.time;
+       auto const frc = piece->frame_rate_change();
        for (int i = 0; i < frc.repeat; ++i) {
                if (t < piece->end()) {
                        emit_video (_last_video[wp], t);