Send RTCP even if the media stream is inactive (#3615)

This commit is contained in:
sauwming 2023-06-28 15:40:48 +08:00 committed by GitHub
parent 3ad3cdbf14
commit b6ce6c4ce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -1401,6 +1401,14 @@ static pj_status_t put_frame_imp( pjmedia_port *port,
/* Update RTCP stats with last RTP timestamp. */
stream->rtcp.stat.rtp_tx_last_ts = pj_ntohl(channel->rtp.out_hdr.ts);
/* Check if now is the time to transmit RTCP SR/RR report.
* We only do this when the decoder is paused,
* because otherwise check_tx_rtcp() will be handled by on_rx_rtp().
*/
if (stream->dec->paused) {
check_tx_rtcp(stream, pj_ntohl(channel->rtp.out_hdr.ts));
}
return PJ_SUCCESS;
}