init player when receiving a header message

This commit is contained in:
badaix 2016-01-31 23:56:28 +01:00
parent 94944681c2
commit 7b1323646f
12 changed files with 149 additions and 117 deletions

View file

@ -86,7 +86,9 @@ const SampleFormat& PcmReader::getSampleFormat() const
void PcmReader::start()
{
logE << "PcmReader start: " << sampleFormat_.getFormat() << "\n";
//TODO: wrong encoder settings leads to: terminate called after throwing an instance of 'std::system_error' what(): Invalid argument
encoder_->init(this, sampleFormat_);
active_ = true;
readerThread_ = thread(&PcmReader::worker, this);
}