summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-08-08 23:59:26 +0100
committerCarl Hetherington <cth@carlh.net>2018-08-09 22:31:11 +0100
commit33c42a2c411d7518d0db5dbe338d0b42192c2730 (patch)
tree3096052c309d3f33508abba899fa293768a8e678 /src/lib
parentf0f4368b7de7e20bed07bc4756c4dd6ba5764808 (diff)
Rather dubious fix for crash due to the sequence:
- playlist change - _have_valid_pieces -> false - signal butler - but meanwhile, pass happens which calls setup_pieces and starts emitting data from time 0 - this new data is not in sync with what's already in the audio ring buffers
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index c1a6c0f3c..2313e09e5 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -594,7 +594,13 @@ Player::pass ()
boost::mutex::scoped_lock lm (_mutex);
if (!_have_valid_pieces) {
- setup_pieces ();
+ /* This should only happen when we are under the control of the butler. In this case, _have_valid_pieces
+ will be false if something in the Player has changed and we are waiting for the butler to notice
+ and do a seek back to the place we were at before. During this time we don't want pass() to do anything,
+ as just after setup_pieces the new decoders will be back to time 0 until the seek has gone through. Just do nothing
+ here and assume that the seek will be forthcoming.
+ */
+ return false;
}
if (_playlist->length() == DCPTime()) {