summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-08-09 00:01:49 +0100
committerCarl Hetherington <cth@carlh.net>2018-08-09 22:31:11 +0100
commit52094ba65baa38dfcedc907cfb4314efb1a549b4 (patch)
tree151fce97f5a38cd61cc3d4fcdb14c8f94d22312d /src/lib
parent33c42a2c411d7518d0db5dbe338d0b42192c2730 (diff)
Remove duplicated stuff from seek_unlocked(); tweak some ordering.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/butler.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/lib/butler.cc b/src/lib/butler.cc
index 45cd5a9db..882d8bf58 100644
--- a/src/lib/butler.cc
+++ b/src/lib/butler.cc
@@ -225,6 +225,10 @@ Butler::seek_unlocked (DCPTime position, bool accurate)
return;
}
+ _finished = false;
+ _pending_seek_position = position;
+ _pending_seek_accurate = accurate;
+
{
boost::mutex::scoped_lock lm (_buffers_mutex);
_video.clear ();
@@ -232,9 +236,6 @@ Butler::seek_unlocked (DCPTime position, bool accurate)
_closed_caption.clear ();
}
- _finished = false;
- _pending_seek_position = position;
- _pending_seek_accurate = accurate;
_summon.notify_all ();
}
@@ -326,16 +327,6 @@ Butler::player_changed ()
seek_to = next;
}
- {
- boost::mutex::scoped_lock lm (_buffers_mutex);
- _video.clear ();
- _audio.clear ();
- _closed_caption.clear ();
- }
-
- _finished = false;
- _summon.notify_all ();
-
seek_unlocked (seek_to, true);
_awaiting = seek_to;
}