Merge pull request #2296 from pjsip/send_rtcp_err_log

use stream name instead of encoder channel name as log when send rtcp fail
This commit is contained in:
Riza Sulistyo 2020-02-21 16:55:57 +07:00 committed by GitHub
commit 5e178972aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -567,7 +567,6 @@ static pj_status_t send_rtcp(pjmedia_vid_stream *stream,
pj_uint8_t *pkt;
int len, max_len;
pj_status_t status;
pjmedia_vid_channel *channel = stream->enc;
/* Build RTCP RR/SR packet */
pjmedia_rtcp_build_rtcp(&stream->rtcp, &sr_rr_pkt, &len);
@ -643,8 +642,7 @@ static pj_status_t send_rtcp(pjmedia_vid_stream *stream,
status = pjmedia_transport_send_rtcp(stream->transport, pkt, len);
if (status != PJ_SUCCESS) {
if (stream->rtcp_tx_err_cnt++ == 0) {
LOGERR_((channel->port.info.name.ptr, status,
"Error sending RTCP"));
LOGERR_((stream->name.ptr, status, "Error sending RTCP"));
}
if (stream->rtcp_tx_err_cnt > SEND_ERR_COUNT_TO_REPORT) {
stream->rtcp_tx_err_cnt = 0;