mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-03 21:57:51 -04:00
LocalSink: safety measures to ensure processSamples does not work when thread is stopping
This commit is contained in:
parent
ae07fba863
commit
78d62789f2
@ -111,6 +111,11 @@ void LocalSink::stop()
|
|||||||
{
|
{
|
||||||
qDebug("LocalSink::stop");
|
qDebug("LocalSink::stop");
|
||||||
|
|
||||||
|
disconnect(this,
|
||||||
|
SIGNAL(samplesAvailable(const quint8*, uint)),
|
||||||
|
m_sinkThread,
|
||||||
|
SLOT(processSamples(const quint8*, uint)));
|
||||||
|
|
||||||
if (m_sinkThread != 0)
|
if (m_sinkThread != 0)
|
||||||
{
|
{
|
||||||
m_sinkThread->startStop(false);
|
m_sinkThread->startStop(false);
|
||||||
|
@ -74,7 +74,7 @@ void LocalSinkThread::run()
|
|||||||
|
|
||||||
void LocalSinkThread::processSamples(const quint8* data, uint count)
|
void LocalSinkThread::processSamples(const quint8* data, uint count)
|
||||||
{
|
{
|
||||||
if (m_sampleFifo) {
|
if (m_sampleFifo && m_running) {
|
||||||
m_sampleFifo->write(data, count);
|
m_sampleFifo->write(data, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user