From 046de691cb3f59f9d3010db415156e30b9a081be Mon Sep 17 00:00:00 2001 From: Dw9 Date: Wed, 18 Sep 2024 19:09:14 +0800 Subject: [PATCH] Fix the issue of RTP sorting cache crashing when the sequence is reset (#3915) --- src/Rtsp/RtpReceiver.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Rtsp/RtpReceiver.h b/src/Rtsp/RtpReceiver.h index 933a14c0..62a16851 100644 --- a/src/Rtsp/RtpReceiver.h +++ b/src/Rtsp/RtpReceiver.h @@ -64,6 +64,7 @@ public: output(seq, std::move(packet)); // 清空连续包列表 flushPacket(); + _pkt_drop_cache_map.clear(); return; } @@ -163,9 +164,6 @@ private: } break; } - if (!_pkt_drop_cache_map.empty()) { - _pkt_drop_cache_map.clear(); - } } iterator popIterator(iterator it) {