Fix Playlist refcount when deleting track

Both Disk-reader and Disk-writer use the same playlist.
ARDOUR::Track::use_playlist() sets it for both Disk-IO processors,
so it needs to be released by both on destruction.
This commit is contained in:
Robin Gareus 2019-03-19 03:02:30 +01:00
parent 7054b2ffc7
commit ab79165893
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 6 additions and 6 deletions

View File

@ -78,6 +78,12 @@ DiskIOProcessor::~DiskIOProcessor ()
channels.flush ();
delete _midi_buf;
for (uint32_t n = 0; n < DataType::num_types; ++n) {
if (_playlists[n]) {
_playlists[n]->release ();
}
}
}

View File

@ -68,12 +68,6 @@ DiskReader::DiskReader (Session& s, string const & str, DiskIOProcessor::Flag f)
DiskReader::~DiskReader ()
{
DEBUG_TRACE (DEBUG::Destruction, string_compose ("DiskReader %1 @ %2 deleted\n", _name, this));
for (uint32_t n = 0; n < DataType::num_types; ++n) {
if (_playlists[n]) {
_playlists[n]->release ();
}
}
}
void