Correctly stop when we have no decoders and we haven't filled.
authorCarl Hetherington <cth@carlh.net>
Mon, 8 May 2017 14:36:54 +0000 (15:36 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 8 May 2017 14:36:54 +0000 (15:36 +0100)
src/lib/player.cc

index fd83886db7d3473bdac9a47ffa6ed4ef9f05b659..a186202db49e1d6f238809b04d0175f087dbd316 100644 (file)
@@ -549,13 +549,16 @@ Player::pass ()
                fill_from = _last_seek_time;
        }
 
+       bool filled = false;
        if (fill_from && ((fill_towards - fill_from.get())) > one_video_frame()) {
                emit_video (black_player_video_frame(), fill_from.get());
+               filled = true;
        } else if (_playlist->length() == DCPTime()) {
                emit_video (black_player_video_frame(), DCPTime());
+               filled = true;
        }
 
-       if (!earliest && !fill_from) {
+       if (!earliest && !filled) {
                return true;
        }