possible fix for race between diskstream buffer overwrite and channel setup
git-svn-id: svn://localhost/ardour2/branches/3.0@6843 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7ed95f7c37
commit
ad7025ae84
@ -343,6 +343,12 @@ Diskstream::set_speed (double sp)
|
||||
int
|
||||
Diskstream::use_playlist (boost::shared_ptr<Playlist> playlist)
|
||||
{
|
||||
if (!playlist) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool no_prior_playlist = true;
|
||||
|
||||
{
|
||||
Glib::Mutex::Lock lm (state_lock);
|
||||
|
||||
@ -354,6 +360,7 @@ Diskstream::use_playlist (boost::shared_ptr<Playlist> playlist)
|
||||
|
||||
if (_playlist) {
|
||||
_playlist->release();
|
||||
no_prior_playlist = false;
|
||||
}
|
||||
|
||||
_playlist = playlist;
|
||||
@ -373,7 +380,7 @@ Diskstream::use_playlist (boost::shared_ptr<Playlist> playlist)
|
||||
take care of the buffer refill.
|
||||
*/
|
||||
|
||||
if (!overwrite_queued && !(_session.state_of_the_state() & Session::CannotSave)) {
|
||||
if (!overwrite_queued && no_prior_playlist) {
|
||||
_session.request_overwrite_buffer (this);
|
||||
overwrite_queued = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user