Drop PCM chunks that are too old

This commit is contained in:
badaix 2020-02-26 19:35:19 +01:00
parent 7376c7709c
commit 92088eb9c2
3 changed files with 43 additions and 27 deletions

View file

@ -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;
{