summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-12-08 23:52:32 +0000
committerCarl Hetherington <cth@carlh.net>2013-12-08 23:52:32 +0000
commit24d5048ae8787ff1802333c6ce91a79ed3c3a5ce (patch)
treea7b3b6ce4bcb0e247e2c08076fbd37561b357917 /src
parentaddb931523feb7c633a40a6fdf397e640db2a6f2 (diff)
Small cleanup with _have_valid_pieces; don't allow repeat_last_video if we don't currently have valid pieces (fixes #281).
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index f4e181daf..7f500b3d6 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -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;
}