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

@ -56,8 +56,6 @@ public:
virtual ~Encoder()
{
if (headerChunk_ != NULL)
delete headerChunk_;
}
/// The listener will receive the encoded stream
@ -86,7 +84,7 @@ public:
}
/// Header information needed to decode the data
virtual msg::Header* getHeader() const
virtual std::shared_ptr<msg::Header> getHeader() const
{
return headerChunk_;
}
@ -95,7 +93,7 @@ protected:
virtual void initEncoder() = 0;
SampleFormat sampleFormat_;
msg::Header* headerChunk_;
std::shared_ptr<msg::Header> headerChunk_;
EncoderListener* listener_;
std::string codecOptions_;
};