From ea10d7907fd4ee1a6674856bf1a95820619d816f Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 12 Aug 2020 17:01:40 +0800 Subject: [PATCH] RTC: Refine error pithy print log --- trunk/src/app/srs_app_rtc_conn.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/trunk/src/app/srs_app_rtc_conn.cpp b/trunk/src/app/srs_app_rtc_conn.cpp index 42ce8bf47..cdca35c41 100644 --- a/trunk/src/app/srs_app_rtc_conn.cpp +++ b/trunk/src/app/srs_app_rtc_conn.cpp @@ -459,7 +459,9 @@ srs_error_t SrsRtcPlayStream::cycle() srs_trace("RTC: start play url=%s, source_id=[%d][%s], realtime=%d, mw_msgs=%d", req_->get_stream_url().c_str(), ::getpid(), cid.c_str(), realtime, mw_msgs); - SrsErrorPithyPrint epp; + SrsErrorPithyPrint* epp = new SrsErrorPithyPrint(); + SrsAutoFree(SrsErrorPithyPrint, epp); + SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_play(); SrsAutoFree(SrsPithyPrint, pprint); @@ -499,8 +501,8 @@ srs_error_t SrsRtcPlayStream::cycle() // Send-out all RTP packets and do cleanup if (true) { if ((err = send_packets(source, pkts, info)) != srs_success) { - if (epp.can_print(err)) { - srs_warn("play send packets=%u, err: %s", pkts.size(), srs_error_desc(err).c_str()); + if (epp->can_print(err)) { + srs_warn("play send packets=%u, nn=%u, err: %s", pkts.size(), epp->nn_count, srs_error_desc(err).c_str()); } srs_freep(err); }