mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-27 15:07:06 +02:00
Drop PCM chunks that are too old
This commit is contained in:
parent
7376c7709c
commit
92088eb9c2
3 changed files with 43 additions and 27 deletions
|
@ -97,11 +97,7 @@ void StreamServer::onChunkRead(const PcmStream* pcmStream, msg::PcmChunk* chunk,
|
|||
// wrap it into a unique_ptr to ensure that the memory will be freed
|
||||
unique_ptr<msg::PcmChunk> chunk_ptr(chunk);
|
||||
|
||||
std::ostringstream oss;
|
||||
tv t;
|
||||
chunk_ptr->sent = t;
|
||||
chunk_ptr->serialize(oss);
|
||||
shared_const_buffer buffer(oss.str());
|
||||
shared_const_buffer buffer(*chunk_ptr);
|
||||
|
||||
std::vector<std::shared_ptr<StreamSession>> sessions;
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue