From df3ec15cd10b472e429c79ff8447aab4df02ad88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E7=AB=8B=E6=96=B0?= Date: Mon, 17 Feb 2020 18:08:16 +0800 Subject: [PATCH] Fix checking the completion of one frame data in RTSP RTP stream --- trunk/src/app/srs_app_rtsp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_rtsp.cpp b/trunk/src/app/srs_app_rtsp.cpp index 051071b49..4488b6d98 100644 --- a/trunk/src/app/srs_app_rtsp.cpp +++ b/trunk/src/app/srs_app_rtsp.cpp @@ -94,11 +94,14 @@ srs_error_t SrsRtpConn::on_udp_packet(const sockaddr* from, const int fromlen, c } cache->copy(&pkt); cache->payload->append(pkt.payload->bytes(), pkt.payload->length()); - if (!cache->completed && pprint->can_print()) { + if (pprint->can_print()) { srs_trace("<- " SRS_CONSTS_LOG_STREAM_CASTER " rtsp: rtp chunked %dB, age=%d, vt=%d/%u, sts=%u/%#x/%#x, paylod=%dB", nb_buf, pprint->age(), cache->version, cache->payload_type, cache->sequence_number, cache->timestamp, cache->ssrc, cache->payload->length() ); + } + + if (!cache->completed){ return err; } } else { @@ -645,6 +648,7 @@ srs_error_t SrsRtspConn::connect() std::string output = output_template; output = srs_string_replace(output, "[app]", app); output = srs_string_replace(output, "[stream]", rtsp_stream); + url = output; } // connect host.