mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-25 06:56:15 +02:00
fixed crash when switching streams
This commit is contained in:
parent
060e52aeee
commit
3a5af32d98
5 changed files with 14 additions and 2 deletions
|
@ -50,6 +50,7 @@ FlacDecoder::FlacDecoder() : Decoder()
|
|||
|
||||
FlacDecoder::~FlacDecoder()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
delete flacChunk;
|
||||
delete decoder;
|
||||
}
|
||||
|
@ -57,6 +58,7 @@ FlacDecoder::~FlacDecoder()
|
|||
|
||||
bool FlacDecoder::decode(msg::PcmChunk* chunk)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
cacheInfo_.reset();
|
||||
pcmChunk = chunk;
|
||||
flacChunk->payload = (char*)realloc(flacChunk->payload, chunk->payloadSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue