kopia lustrzana https://github.com/f4exb/sdrangel
				
				
				
			LocalSink: safety measures to ensure processSamples does not work when thread is stopping
							rodzic
							
								
									ae07fba863
								
							
						
					
					
						commit
						78d62789f2
					
				|  | @ -111,6 +111,11 @@ void LocalSink::stop() | |||
| { | ||||
|     qDebug("LocalSink::stop"); | ||||
| 
 | ||||
|     disconnect(this, | ||||
|             SIGNAL(samplesAvailable(const quint8*, uint)), | ||||
|             m_sinkThread, | ||||
|             SLOT(processSamples(const quint8*, uint))); | ||||
| 
 | ||||
|     if (m_sinkThread != 0) | ||||
|     { | ||||
|         m_sinkThread->startStop(false); | ||||
|  |  | |||
|  | @ -74,7 +74,7 @@ void LocalSinkThread::run() | |||
| 
 | ||||
| void LocalSinkThread::processSamples(const quint8* data, uint count) | ||||
| { | ||||
|     if (m_sampleFifo) { | ||||
|     if (m_sampleFifo && m_running) { | ||||
|         m_sampleFifo->write(data, count); | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 f4exb
						f4exb