mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-24 22:46:14 +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
|
@ -39,6 +39,7 @@ OggDecoder::OggDecoder() : Decoder(), buffer(NULL), bytes(0)
|
|||
|
||||
OggDecoder::~OggDecoder()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
free(convbuffer);
|
||||
vorbis_block_clear(&vb);
|
||||
vorbis_dsp_clear(&vd);
|
||||
|
@ -51,7 +52,7 @@ OggDecoder::~OggDecoder()
|
|||
|
||||
bool OggDecoder::decode(msg::PcmChunk* chunk)
|
||||
{
|
||||
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
/* grab some data at the head of the stream. We want the first page
|
||||
(which is guaranteed to be small and only contain the Vorbis
|
||||
stream initial header) We need the first page to get the stream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue