Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Unified Diff: webrtc/modules/audio_coding/neteq/packet_buffer.cc

Issue 2342443005: Moved Opus-specific payload splitting into AudioDecoderOpus. (Closed)
Patch Set: Priority levels are ints, kHighestPriority is gone. Also small cleanups. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/packet_buffer.cc
diff --git a/webrtc/modules/audio_coding/neteq/packet_buffer.cc b/webrtc/modules/audio_coding/neteq/packet_buffer.cc
index c5b23dce068c3df75b816579b2964500fd828b7d..84f272c4f6d0939852f2a379c7df18f68778aa96 100644
--- a/webrtc/modules/audio_coding/neteq/packet_buffer.cc
+++ b/webrtc/modules/audio_coding/neteq/packet_buffer.cc
@@ -281,7 +281,9 @@ size_t PacketBuffer::NumSamplesInBuffer(size_t last_decoded_length) const {
size_t last_duration = last_decoded_length;
for (Packet* packet : buffer_) {
if (packet->frame) {
- if (!packet->primary) {
+ // TODO(hlundin): Verify that it's fine to count all packets and remove
+ // this check.
+ if (packet->priority != Packet::Priority(0, 0)) {
continue;
}
size_t duration = packet->frame->Duration();

Powered by Google App Engine
This is Rietveld 408576698