Audio/MidiJack: Fix invalid read: (2) of #5408
This patch * makes `m_stopped` atomic * initializes `m_stopped` correctly to `true` * moves the initialization of `m_stopped` to the point where jack ports are already connected
This commit is contained in:
committed by
Johannes Lorenz
parent
c6d60e982e
commit
9e9c5acc17
@@ -56,6 +56,8 @@ AudioJack::AudioJack( bool & _success_ful, Mixer* _mixer ) :
|
||||
m_framesDoneInCurBuf( 0 ),
|
||||
m_framesToDoInCurBuf( 0 )
|
||||
{
|
||||
m_stopped = true;
|
||||
|
||||
_success_ful = initJackClient();
|
||||
if( _success_ful )
|
||||
{
|
||||
@@ -201,8 +203,6 @@ bool AudioJack::initJackClient()
|
||||
|
||||
void AudioJack::startProcessing()
|
||||
{
|
||||
m_stopped = false;
|
||||
|
||||
if( m_active || m_client == NULL )
|
||||
{
|
||||
return;
|
||||
@@ -245,6 +245,7 @@ void AudioJack::startProcessing()
|
||||
}
|
||||
}
|
||||
|
||||
m_stopped = false;
|
||||
free( ports );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user