Don't emit video until film's end if we are seeking.
authorCarl Hetherington <cth@carlh.net>
Mon, 8 Apr 2024 21:59:39 +0000 (23:59 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 22 Apr 2024 11:03:04 +0000 (13:03 +0200)
Otherwise if we seek to the frame just before the end of the DCP
we'll call emit_video_until() with _next_video unset, causing that
method to emit video for the whole film.

The point of this emit_video_until() call is only to pad a space
between the end of the video content and the end of the film.

src/lib/player.cc

index dba02cfbafaf02ecf5f63a0e93719fc9df06a1d2..913d7392f9084c96d204605a0b758ad35c8951d2 100644 (file)
@@ -887,8 +887,10 @@ Player::pass ()
        }
 
        if (done) {
-               LOG_DEBUG_PLAYER("Done: emit video until end of film at %1", to_string(film->length()));
-               emit_video_until(film->length());
+               if (_next_video_time) {
+                       LOG_DEBUG_PLAYER("Done: emit video until end of film at %1", to_string(film->length()));
+                       emit_video_until(film->length());
+               }
 
                if (_shuffler) {
                        _shuffler->flush ();