encoder header is shared ptr

This commit is contained in:
badaix 2016-02-03 23:05:28 +01:00
parent bfdca3038d
commit d44232114a
7 changed files with 12 additions and 15 deletions

View file

@ -28,7 +28,7 @@ using namespace std;
FlacEncoder::FlacEncoder(const std::string& codecOptions) : Encoder(codecOptions), encoder_(NULL), pcmBufferSize_(0), encodedSamples_(0)
{
flacChunk_ = new msg::PcmChunk();
headerChunk_ = new msg::Header("flac");
headerChunk_.reset(new msg::Header("flac"));
pcmBuffer_ = (FLAC__int32*)malloc(pcmBufferSize_ * sizeof(FLAC__int32));
}