Better buffer size estimation in NetEq for redundant packets

TEST=passed_all_trybots
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/15579005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6260 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
minyue@webrtc.org 2014-05-28 07:48:01 +00:00
parent 1b9df05c85
commit 0aa3ee661c

View File

@ -217,11 +217,11 @@ int PacketBuffer::NumSamplesInBuffer(DecoderDatabase* decoder_database,
int duration;
if (packet->sync_packet) {
duration = last_duration;
} else if (packet->primary) {
duration =
decoder->PacketDuration(packet->payload, packet->payload_length);
} else {
duration = packet->primary ?
decoder->PacketDuration(packet->payload, packet->payload_length) :
decoder->PacketDurationRedundant(packet->payload,
packet->payload_length);
continue;
}
if (duration >= 0) {
last_duration = duration; // Save the most up-to-date (valid) duration.