From 189b02e40012015bc3fcaa15e75a38fb3fd01150 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 2 Jun 2024 13:11:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E6=9E=90rtp=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=85=BC=E5=AE=B9rtsp=E6=9C=8D=E5=8A=A1=E7=AB=AF=E5=8F=91?= =?UTF-8?q?=E9=80=81=E7=BC=93=E5=86=B2=E5=8C=BA=E6=BA=A2=E5=87=BA=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtspSplitter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Rtsp/RtspSplitter.cpp b/src/Rtsp/RtspSplitter.cpp index 33e6e694..837728f2 100644 --- a/src/Rtsp/RtspSplitter.cpp +++ b/src/Rtsp/RtspSplitter.cpp @@ -13,6 +13,7 @@ #include "Util/util.h" #include "Util/logger.h" #include "Common/macros.h" +#include "Rtsp/RtpReceiver.h" using namespace std; using namespace toolkit; @@ -59,7 +60,11 @@ const char *RtspSplitter::onSearchPacketTail_l(const char *data, size_t len) { ssize_t RtspSplitter::onRecvHeader(const char *data, size_t len) { if (_isRtpPacket) { - onRtpPacket(data, len); + try { + onRtpPacket(data, len); + } catch (RtpTrack::BadRtpException &ex) { + WarnL << ex.what(); + } return 0; } if (len == 4 && !memcmp(data, "\r\n\r\n", 4)) {