Fix: NetEq PacketBuffer logs discarded packet with wrong codec level when new packet replaces the lower level packet

Bug: webrtc:9370
Change-Id: I59606ef6ea9bbf26de844a2fd3f597856271a86a
Reviewed-on: https://webrtc-review.googlesource.com/81700
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23555}
This commit is contained in:
Peng Yu
2018-06-07 19:20:55 +08:00
committed by Commit Bot
parent ec9c745228
commit b90e63c620
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ Mo Zanaty <mzanaty@cisco.com>
Pali Rohar
Paul Kapustin <pkapustin@gmail.com>
Philipp Hancke <philipp.hancke@googlemail.com>
Peng Yu <yupeng323@gmail.com>
Rafael Lopez Diez <rafalopezdiez@gmail.com>
Ralph Giles <giles@ghostscript.com>
Riku Voipio <riku.voipio@linaro.org>

View File

@ -118,7 +118,7 @@ int PacketBuffer::InsertPacket(Packet&& packet, StatisticsCalculator* stats) {
// packet.
PacketList::iterator it = rit.base();
if (it != buffer_.end() && packet.timestamp == it->timestamp) {
LogPacketDiscarded(packet.priority.codec_level, stats);
LogPacketDiscarded(it->priority.codec_level, stats);
it = buffer_.erase(it);
}
buffer_.insert(it, std::move(packet)); // Insert the packet at that position.