Small cleanup with _have_valid_pieces; don't allow repeat_last_video if we don't...
authorCarl Hetherington <cth@carlh.net>
Sun, 8 Dec 2013 23:52:32 +0000 (23:52 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 8 Dec 2013 23:52:32 +0000 (23:52 +0000)
ChangeLog
src/lib/player.cc

index 543775d6f8d2df83685c131bdb08675c7ee01226..b15800a510a7c6d08040e1dccc6ac27cf0cc792a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-08  Carl Hetherington  <cth@carlh.net>
+
+       * Fix display update when removing content (#281).
+
 2013-12-07  Carl Hetherington  <cth@carlh.net>
 
        * Version 1.41 released.
index f4e181daf302ad1163476ab9cd2c35e13ffd309b..7f500b3d6f358a1e786b4ee61f5ddf281a7e9e71 100644 (file)
@@ -144,7 +144,6 @@ Player::pass ()
 {
        if (!_have_valid_pieces) {
                setup_pieces ();
-               _have_valid_pieces = true;
        }
 
        Time earliest_t = TIME_MAX;
@@ -400,7 +399,6 @@ Player::seek (Time t, bool accurate)
 {
        if (!_have_valid_pieces) {
                setup_pieces ();
-               _have_valid_pieces = true;
        }
 
        if (_pieces.empty ()) {
@@ -492,6 +490,8 @@ Player::setup_pieces ()
 
                _pieces.push_back (piece);
        }
+
+       _have_valid_pieces = true;
 }
 
 void
@@ -684,7 +684,7 @@ Player::update_subtitle ()
 bool
 Player::repeat_last_video ()
 {
-       if (!_last_incoming_video.image) {
+       if (!_last_incoming_video.image || !_have_valid_pieces) {
                return false;
        }