From f504c03fec820ab8c6ec7226cb0216c8c4f8e620 Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Mon, 6 Mar 2023 20:39:03 +0800 Subject: [PATCH] WebRTC: Negotiate publish/play error and print sdp info. --- trunk/src/app/srs_app_rtc_conn.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trunk/src/app/srs_app_rtc_conn.cpp b/trunk/src/app/srs_app_rtc_conn.cpp index b26dfa16a2b..ba3f0f397d0 100644 --- a/trunk/src/app/srs_app_rtc_conn.cpp +++ b/trunk/src/app/srs_app_rtc_conn.cpp @@ -1896,6 +1896,7 @@ srs_error_t SrsRtcConnection::add_publisher(SrsRtcUserConfig* ruc, SrsSdp& local // TODO: FIXME: Change to api of stream desc. if ((err = negotiate_publish_capability(ruc, stream_desc)) != srs_success) { + srs_error("publish negotiate offer=%s", srs_string_replace(ruc->remote_sdp_str_.c_str(), "\r\n", "\\r\\n").c_str()); return srs_error_wrap(err, "publish negotiate, offer=%s", ruc->remote_sdp_str_.c_str()); } @@ -1935,6 +1936,7 @@ srs_error_t SrsRtcConnection::add_player(SrsRtcUserConfig* ruc, SrsSdp& local_sd std::map play_sub_relations; if ((err = negotiate_play_capability(ruc, play_sub_relations)) != srs_success) { + srs_error("play negotiate offer=%s", srs_string_replace(ruc->remote_sdp_str_.c_str(), "\r\n", "\\r\\n").c_str()); return srs_error_wrap(err, "play negotiate, offer=%s", ruc->remote_sdp_str_.c_str()); }