kopia lustrzana https://github.com/f4exb/sdrangel
APT demod: fixed some possible memory leaks
rodzic
8c9f5ff14c
commit
e8dec5db83
|
@ -65,7 +65,7 @@ void APTDemodSink::resetDecoder()
|
|||
|
||||
APTDemodSink::~APTDemodSink()
|
||||
{
|
||||
delete m_samples;
|
||||
delete[] m_samples;
|
||||
}
|
||||
|
||||
// callback from APT library to get audio samples
|
||||
|
@ -121,11 +121,11 @@ void APTDemodSink::feed(const SampleVector::const_iterator& begin, const SampleV
|
|||
// Have we enough samples to decode one line?
|
||||
// 2 lines per second
|
||||
if (m_sampleCount >= APTDEMOD_AUDIO_SAMPLE_RATE)
|
||||
{
|
||||
if (getImageWorkerMessageQueue())
|
||||
{
|
||||
float *pixels = new float[APT_PROW_WIDTH];
|
||||
apt_getpixelrow(pixels, m_row, &m_zenith, m_row == 0, getsamples, this);
|
||||
|
||||
if (getImageWorkerMessageQueue()) {
|
||||
getImageWorkerMessageQueue()->push(APTDemod::MsgPixels::create(pixels, m_zenith));
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue