mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 08:06:41 +02:00
Pass encoded chunks as shared_ptr
This commit is contained in:
parent
d9d403d729
commit
63ad64dfff
10 changed files with 15 additions and 21 deletions
|
@ -49,7 +49,7 @@ PcmEncoder::PcmEncoder(const std::string& codecOptions) : Encoder(codecOptions)
|
|||
|
||||
void PcmEncoder::encode(const msg::PcmChunk* chunk)
|
||||
{
|
||||
auto* pcmChunk = new msg::PcmChunk(*chunk);
|
||||
auto pcmChunk = std::make_shared<msg::PcmChunk>(*chunk);
|
||||
listener_->onChunkEncoded(this, pcmChunk, pcmChunk->durationMs());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue