summaryrefslogtreecommitdiff
path: root/src/lib/butler.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-08-13 17:37:52 +0100
committerCarl Hetherington <cth@carlh.net>2018-08-14 00:05:06 +0100
commit1fe6bd7f8ba059322b8357b2210f0fd590567ce2 (patch)
tree2c76fbf24b9b520f94f741040f11dc920d3bab91 /src/lib/butler.cc
parentf30ad4dec0a3fa5f1770fba93106a3e8910d66ba (diff)
More fixes for errors / crashes / misbehaviour with content changes
and the butler. Here we signal both before and after a change in content. Before, the player disables itself so that any pass()/seek() will be no-ops. After, the player rebuilds its pieces and the butler re-seeks to get back to where it was before the change.
Diffstat (limited to 'src/lib/butler.cc')
-rw-r--r--src/lib/butler.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/butler.cc b/src/lib/butler.cc
index 6789d74a5..386e7f9db 100644
--- a/src/lib/butler.cc
+++ b/src/lib/butler.cc
@@ -64,7 +64,8 @@ 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, _2));
+ _player_changed_connection = _player->Changed.connect (bind (&Butler::return_seek, this, _2));
+ _player_not_changed_connection = _player->NotChanged.connect (bind (&Butler::return_seek, this, false));
_thread = new boost::thread (bind (&Butler::thread, this));
#ifdef DCPOMATIC_LINUX
pthread_setname_np (_thread->native_handle(), "butler");
@@ -309,7 +310,7 @@ Butler::memory_used () const
}
void
-Butler::player_changed (bool frequent)
+Butler::return_seek (bool frequent)
{
boost::mutex::scoped_lock lm (_mutex);
if (_died || _pending_seek_position || frequent) {