From b90e63c620877712e45ee320cfa25cb825bf5373 Mon Sep 17 00:00:00 2001 From: Peng Yu Date: Thu, 7 Jun 2018 19:20:55 +0800 Subject: [PATCH] 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 Reviewed-by: Henrik Lundin Reviewed-by: Minyue Li Cr-Commit-Position: refs/heads/master@{#23555} --- AUTHORS | 1 + modules/audio_coding/neteq/packet_buffer.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 15f2589e05..694e98e5f2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -39,6 +39,7 @@ Mo Zanaty Pali Rohar Paul Kapustin Philipp Hancke +Peng Yu Rafael Lopez Diez Ralph Giles Riku Voipio diff --git a/modules/audio_coding/neteq/packet_buffer.cc b/modules/audio_coding/neteq/packet_buffer.cc index 9752ec6be1..c08c44712d 100644 --- a/modules/audio_coding/neteq/packet_buffer.cc +++ b/modules/audio_coding/neteq/packet_buffer.cc @@ -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.