1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 15:51:47 -05:00

FreeDV: Fix memory allocation/free issues. Part of #2315.

This commit is contained in:
srcejon 2024-11-14 11:40:46 +00:00
parent 0a94970a70
commit 7c7a7d7c1e
2 changed files with 4 additions and 1 deletions

View File

@ -79,6 +79,7 @@ FreeDVDemod::FreeDVDemod(DeviceAPI *deviceAPI) :
FreeDVDemod::~FreeDVDemod() FreeDVDemod::~FreeDVDemod()
{ {
stop();
QObject::disconnect( QObject::disconnect(
m_networkManager, m_networkManager,
&QNetworkAccessManager::finished, &QNetworkAccessManager::finished,

View File

@ -176,6 +176,8 @@ FreeDVDemodSink::~FreeDVDemodSink()
{ {
delete SSBFilter; delete SSBFilter;
delete[] m_SSBFilterBuffer; delete[] m_SSBFilterBuffer;
delete[] m_speechOut;
delete[] m_modIn;
} }
void FreeDVDemodSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end) void FreeDVDemodSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end)
@ -449,7 +451,7 @@ void FreeDVDemodSink::applyFreeDVMode(FreeDVDemodSettings::FreeDVMode mode)
freedv_set_ext_vco(m_freeDV, 0); freedv_set_ext_vco(m_freeDV, 0);
freedv_set_sync(m_freeDV, FREEDV_SYNC_MANUAL); freedv_set_sync(m_freeDV, FREEDV_SYNC_MANUAL);
int nSpeechSamples = freedv_get_n_speech_samples(m_freeDV); int nSpeechSamples = freedv_get_n_max_speech_samples(m_freeDV);
int nMaxModemSamples = freedv_get_n_max_modem_samples(m_freeDV); int nMaxModemSamples = freedv_get_n_max_modem_samples(m_freeDV);
int Fs = freedv_get_modem_sample_rate(m_freeDV); int Fs = freedv_get_modem_sample_rate(m_freeDV);
int Rs = freedv_get_modem_symbol_rate(m_freeDV); int Rs = freedv_get_modem_symbol_rate(m_freeDV);