summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-08-12 22:02:25 +0100
committerCarl Hetherington <cth@carlh.net>2018-08-12 22:02:25 +0100
commitb733ff51f0212d02dbf33ccb62e67f07941f5ace (patch)
tree542bd2024d6d249d779b11ca1d43fc9b652fe69b
parent6b9bda07984837d188064f3f5514d0aa132655ec (diff)
Don't seek during timeline drags.
-rw-r--r--src/lib/butler.cc6
-rw-r--r--src/lib/butler.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/butler.cc b/src/lib/butler.cc
index 882d8bf58..6789d74a5 100644
--- a/src/lib/butler.cc
+++ b/src/lib/butler.cc
@@ -64,7 +64,7 @@ Butler::Butler (shared_ptr<Player> player, shared_ptr<Log> log, AudioMapping aud
_player_video_connection = _player->Video.connect (bind (&Butler::video, this, _1, _2));
_player_audio_connection = _player->Audio.connect (bind (&Butler::audio, this, _1, _2));
_player_text_connection = _player->Text.connect (bind (&Butler::text, this, _1, _2, _3));
- _player_changed_connection = _player->Changed.connect (bind (&Butler::player_changed, this));
+ _player_changed_connection = _player->Changed.connect (bind (&Butler::player_changed, this, _2));
_thread = new boost::thread (bind (&Butler::thread, this));
#ifdef DCPOMATIC_LINUX
pthread_setname_np (_thread->native_handle(), "butler");
@@ -309,10 +309,10 @@ Butler::memory_used () const
}
void
-Butler::player_changed ()
+Butler::player_changed (bool frequent)
{
boost::mutex::scoped_lock lm (_mutex);
- if (_died || _pending_seek_position) {
+ if (_died || _pending_seek_position || frequent) {
return;
}
diff --git a/src/lib/butler.h b/src/lib/butler.h
index 0b926047a..5b09f6e5f 100644
--- a/src/lib/butler.h
+++ b/src/lib/butler.h
@@ -56,7 +56,7 @@ private:
void text (PlayerText pt, TextType type, DCPTimePeriod period);
bool should_run () const;
void prepare (boost::weak_ptr<PlayerVideo> video) const;
- void player_changed ();
+ void player_changed (bool frequent);
void seek_unlocked (DCPTime position, bool accurate);
boost::shared_ptr<Player> _player;