13
0

ensure that stub audio file sources are removed when we destroy a track

This commit is contained in:
Paul Davis 2015-02-20 14:11:46 -05:00
parent dcf69ab3e6
commit 7024232855

View File

@ -2445,6 +2445,24 @@ AudioDiskstream::ChannelInfo::resize_capture (framecnt_t capture_bufsize)
AudioDiskstream::ChannelInfo::~ChannelInfo ()
{
if (write_source) {
if (write_source->removable()) {
/* this is a "stub" write source which exists in the
Session source list, but is removable. We must emit
a drop references call because it should not
continue to exist. If we do not do this, then the
Session retains a reference to it, it is not
deleted, and later attempts to create a new source
file will use wierd naming because it already
exists.
XXX longer term TO-DO: do not add to session source
list until we write to the source.
*/
write_source->drop_references ();
}
}
write_source.reset ();
delete [] speed_buffer;