From 0956a24d2ec542c3a4760dc02848913a9328df14 Mon Sep 17 00:00:00 2001 From: badaix Date: Fri, 28 Feb 2020 08:15:14 +0100 Subject: [PATCH] Small fix in queue cleanup --- server/stream_session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/stream_session.cpp b/server/stream_session.cpp index ca796a5b..b9307a3c 100644 --- a/server/stream_session.cpp +++ b/server/stream_session.cpp @@ -149,7 +149,7 @@ void StreamSession::sendAsync(shared_const_buffer const_buf, bool send_now) { strand_.post([ this, self = shared_from_this(), const_buf, send_now ]() { // delete PCM chunks that are older than the overall buffer duration - messages_.erase(std::remove_if(messages_.begin() + 1, messages_.end(), + messages_.erase(std::remove_if(messages_.begin(), messages_.end(), [this](const shared_const_buffer& buffer) { const auto& msg = buffer.message(); if (!msg.is_pcm_chunk || buffer.on_air)