Browse Source

sigmffileinput: Initialize worker metadata and sample count

Initialize metadata and capture pointers to nullptr and the total
sample count to zero, ensuring the worker starts with defined state.

Identified by cppcheck.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.1.0
Robin Getz 4 weeks ago
parent
commit
032751356d
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 29
      plugins/samplesource/sigmffileinput/sigmffileinputworker.cpp

29
plugins/samplesource/sigmffileinput/sigmffileinputworker.cpp

@ -35,22 +35,25 @@ SigMFFileInputWorker::SigMFFileInputWorker(std::ifstream *samplesStream, @@ -35,22 +35,25 @@ SigMFFileInputWorker::SigMFFileInputWorker(std::ifstream *samplesStream,
const QTimer& timer,
MessageQueue *fileInputMessageQueue,
QObject* parent) :
QObject(parent),
m_running(false),
QObject(parent),
m_running(false),
m_metaInfo(nullptr),
m_captures(nullptr),
m_currentTrackIndex(0),
m_ifstream(samplesStream),
m_fileBuf(0),
m_convertBuf(0),
m_bufsize(0),
m_chunksize(0),
m_sampleFifo(sampleFifo),
m_samplesCount(0),
m_timer(timer),
m_fileInputMessageQueue(fileInputMessageQueue),
m_ifstream(samplesStream),
m_fileBuf(0),
m_convertBuf(0),
m_bufsize(0),
m_chunksize(0),
m_sampleFifo(sampleFifo),
m_samplesCount(0),
m_totalSamples(0),
m_timer(timer),
m_fileInputMessageQueue(fileInputMessageQueue),
m_samplerate(48000),
m_accelerationFactor(1),
m_samplesize(16),
m_samplebytes(2),
m_samplesize(16),
m_samplebytes(2),
m_throttlems(FILESOURCE_THROTTLE_MS),
m_throttleToggle(false),
m_sigMFConverter(nullptr)

Loading…
Cancel
Save