Remove ResetStatistics from RTP feedback.
BUG= R=asapersson@webrtc.org, stefan@webrtc.org Review URL: https://codereview.webrtc.org/1213603002 Cr-Commit-Position: refs/heads/master@{#9548}
This commit is contained in:
@ -171,13 +171,9 @@ bool RtpReceiverImpl::IncomingRtpPacket(
|
||||
|
||||
int8_t first_payload_byte = payload_length > 0 ? payload[0] : 0;
|
||||
bool is_red = false;
|
||||
bool should_reset_statistics = false;
|
||||
|
||||
if (CheckPayloadChanged(rtp_header,
|
||||
first_payload_byte,
|
||||
is_red,
|
||||
&payload_specific,
|
||||
&should_reset_statistics) == -1) {
|
||||
if (CheckPayloadChanged(rtp_header, first_payload_byte, is_red,
|
||||
&payload_specific) == -1) {
|
||||
if (payload_length == 0) {
|
||||
// OK, keep-alive packet.
|
||||
return true;
|
||||
@ -186,10 +182,6 @@ bool RtpReceiverImpl::IncomingRtpPacket(
|
||||
return false;
|
||||
}
|
||||
|
||||
if (should_reset_statistics) {
|
||||
cb_rtp_feedback_->ResetStatistics(ssrc_);
|
||||
}
|
||||
|
||||
WebRtcRTPHeader webrtc_rtp_header;
|
||||
memset(&webrtc_rtp_header, 0, sizeof(webrtc_rtp_header));
|
||||
webrtc_rtp_header.header = rtp_header;
|
||||
@ -276,8 +268,6 @@ void RtpReceiverImpl::CheckSSRCChanged(const RTPHeader& rtp_header) {
|
||||
// We need the payload_type_ to make the call if the remote SSRC is 0.
|
||||
new_ssrc = true;
|
||||
|
||||
cb_rtp_feedback_->ResetStatistics(ssrc_);
|
||||
|
||||
last_received_timestamp_ = 0;
|
||||
last_received_sequence_number_ = 0;
|
||||
last_received_frame_time_ms_ = -1;
|
||||
@ -330,12 +320,10 @@ void RtpReceiverImpl::CheckSSRCChanged(const RTPHeader& rtp_header) {
|
||||
// this code path moves we can get rid of some of the rtp_receiver ->
|
||||
// media_specific interface (such as CheckPayloadChange, possibly get/set
|
||||
// last known payload).
|
||||
int32_t RtpReceiverImpl::CheckPayloadChanged(
|
||||
const RTPHeader& rtp_header,
|
||||
const int8_t first_payload_byte,
|
||||
bool& is_red,
|
||||
PayloadUnion* specific_payload,
|
||||
bool* should_reset_statistics) {
|
||||
int32_t RtpReceiverImpl::CheckPayloadChanged(const RTPHeader& rtp_header,
|
||||
const int8_t first_payload_byte,
|
||||
bool& is_red,
|
||||
PayloadUnion* specific_payload) {
|
||||
bool re_initialize_decoder = false;
|
||||
|
||||
char payload_name[RTP_PAYLOAD_NAME_SIZE];
|
||||
@ -367,11 +355,10 @@ int32_t RtpReceiverImpl::CheckPayloadChanged(
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
*should_reset_statistics = false;
|
||||
bool should_discard_changes = false;
|
||||
|
||||
rtp_media_receiver_->CheckPayloadChanged(
|
||||
payload_type, specific_payload, should_reset_statistics,
|
||||
payload_type, specific_payload,
|
||||
&should_discard_changes);
|
||||
|
||||
if (should_discard_changes) {
|
||||
@ -403,9 +390,6 @@ int32_t RtpReceiverImpl::CheckPayloadChanged(
|
||||
re_initialize_decoder = false;
|
||||
}
|
||||
}
|
||||
if (re_initialize_decoder) {
|
||||
*should_reset_statistics = true;
|
||||
}
|
||||
} else {
|
||||
rtp_media_receiver_->GetLastMediaSpecificPayload(specific_payload);
|
||||
is_red = false;
|
||||
|
||||
Reference in New Issue
Block a user