diff --git a/src/Rtsp/RtspSplitter.cpp b/src/Rtsp/RtspSplitter.cpp index 7ba7b97d..1994ad10 100644 --- a/src/Rtsp/RtspSplitter.cpp +++ b/src/Rtsp/RtspSplitter.cpp @@ -30,11 +30,7 @@ namespace mediakit{ const char *RtspSplitter::onSearchPacketTail(const char *data, int len) { - if(!_enableRecvRtp){ - _isRtpPacket = false; - return HttpRequestSplitter::onSearchPacketTail(data, len); - } - if(data[0] != '$'){ + if(!_enableRecvRtp || data[0] != '$'){ //这是rtsp包 _isRtpPacket = false; return HttpRequestSplitter::onSearchPacketTail(data, len);