From ada180d6aee5a0140d00655c4f16037490f7f55b Mon Sep 17 00:00:00 2001 From: Dave Behnke <916775+dbehnke@users.noreply.github.com> Date: Sun, 28 Dec 2025 03:28:58 -0500 Subject: [PATCH] Fix P25 StreamID mismatch: clear stale packets in CodecStream::ResetStats --- reflector/CodecStream.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reflector/CodecStream.cpp b/reflector/CodecStream.cpp index 30bc9fa..2414417 100644 --- a/reflector/CodecStream.cpp +++ b/reflector/CodecStream.cpp @@ -59,6 +59,12 @@ void CCodecStream::ResetStats(uint16_t streamid, ECodecType type) m_RTSum = 0; m_RTCount = 0; m_uiTotalPackets = 0; + + // clear any stale packets in the local queue + while (!m_LocalQueue.IsEmpty()) + { + m_LocalQueue.Pop(); + } } void CCodecStream::ReportStats()