RTC: Refine code
This commit is contained in:
parent
e82e28d83e
commit
aac2f1debd
|
|
@ -1756,16 +1756,13 @@ srs_error_t SrsRtcConnection::dispatch_rtcp(SrsRtcpCommon* rtcp)
|
||||||
|
|
||||||
// For TWCC packet.
|
// For TWCC packet.
|
||||||
if (SrsRtcpType_rtpfb == rtcp->type() && 15 == rtcp->get_rc()) {
|
if (SrsRtcpType_rtpfb == rtcp->type() && 15 == rtcp->get_rc()) {
|
||||||
if(srs_success != (err = on_rtcp_feedback_twcc(rtcp->data(), rtcp->size()))) {
|
return on_rtcp_feedback_twcc(rtcp->data(), rtcp->size());
|
||||||
return srs_error_wrap(err, "twcc feedback");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// For REMB packet.
|
// For REMB packet.
|
||||||
if (SrsRtcpType_psfb == rtcp->type()) {
|
if (SrsRtcpType_psfb == rtcp->type()) {
|
||||||
SrsRtcpPsfbCommon* psfb = dynamic_cast<SrsRtcpPsfbCommon*>(rtcp);
|
SrsRtcpPsfbCommon* psfb = dynamic_cast<SrsRtcpPsfbCommon*>(rtcp);
|
||||||
//TODO: user const to replace 15
|
if (15 == psfb->get_rc()) {
|
||||||
if(15 == psfb->get_rc()) {
|
|
||||||
return on_rtcp_feedback_remb(psfb);
|
return on_rtcp_feedback_remb(psfb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user