From 90c164f7f774ba6186931fdc1dc995c09f8fb55a Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Sun, 20 Aug 2023 11:19:57 +0800 Subject: [PATCH] =?UTF-8?q?rtsp=E6=92=AD=E6=94=BE=E5=99=A8=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E9=9D=9E=E6=B3=95=E7=9A=84=E5=9B=9E=E5=A4=8D=20(#2760?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提高对一些rtsp流的兼容性 --- src/Rtsp/RtspPlayer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Rtsp/RtspPlayer.cpp b/src/Rtsp/RtspPlayer.cpp index 599677ec..676d89b1 100644 --- a/src/Rtsp/RtspPlayer.cpp +++ b/src/Rtsp/RtspPlayer.cpp @@ -483,6 +483,11 @@ void RtspPlayer::handleResPAUSE(const Parser &parser, int type) { } void RtspPlayer::onWholeRtspPacket(Parser &parser) { + if (!start_with(parser.method(), "RTSP")) { + // 不是rtsp回复,忽略 + WarnL << "Not rtsp response: " << parser.method(); + return; + } try { decltype(_on_response) func; _on_response.swap(func);