Properly free ports at Track destruction.
This commit is contained in:
parent
b3c3a3956b
commit
4cb087c81a
|
@ -250,6 +250,10 @@ Track::~Track ( )
|
||||||
/* FIXME: why is this necessary? */
|
/* FIXME: why is this necessary? */
|
||||||
timeline->remove_track( this );
|
timeline->remove_track( this );
|
||||||
|
|
||||||
|
/* give up our ports */
|
||||||
|
configure_inputs( 0 );
|
||||||
|
configure_outputs( 0 );
|
||||||
|
|
||||||
log_destroy();
|
log_destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,7 +627,7 @@ Track::configure_outputs ( int n )
|
||||||
if ( p.valid() )
|
if ( p.valid() )
|
||||||
output.push_back( p );
|
output.push_back( p );
|
||||||
else
|
else
|
||||||
printf( "error: could not create output port!\n" );
|
WARNING( "could not create output port!" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -635,7 +639,7 @@ Track::configure_outputs ( int n )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( output.size() )
|
||||||
playback_ds = new Playback_DS( this, engine->frame_rate(), engine->nframes(), output.size() );
|
playback_ds = new Playback_DS( this, engine->frame_rate(), engine->nframes(), output.size() );
|
||||||
|
|
||||||
// engine->unlock();
|
// engine->unlock();
|
||||||
|
@ -671,7 +675,7 @@ Track::configure_inputs ( int n )
|
||||||
if ( p.valid() )
|
if ( p.valid() )
|
||||||
input.push_back( p );
|
input.push_back( p );
|
||||||
else
|
else
|
||||||
printf( "error: could not create input port!\n" );
|
WARNING( "could not create input port!" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -683,6 +687,7 @@ Track::configure_inputs ( int n )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( input.size() )
|
||||||
record_ds = new Record_DS( this, engine->frame_rate(), engine->nframes(), input.size() );
|
record_ds = new Record_DS( this, engine->frame_rate(), engine->nframes(), input.size() );
|
||||||
|
|
||||||
// engine->unlock();
|
// engine->unlock();
|
||||||
|
|
Loading…
Reference in New Issue