Allowing RED decoding for Opus.
BUG=4247
TEST=reproduced and fixed the bug
R=henrik.lundin@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/41809004
Cr-Commit-Position: refs/heads/master@{#8364}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8364 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq/payload_splitter.cc b/webrtc/modules/audio_coding/neteq/payload_splitter.cc
index 118556b..c19375b 100644
--- a/webrtc/modules/audio_coding/neteq/payload_splitter.cc
+++ b/webrtc/modules/audio_coding/neteq/payload_splitter.cc
@@ -151,8 +151,11 @@
switch (info->codec_type) {
case kDecoderOpus:
case kDecoderOpus_2ch: {
- Packet* new_packet = new Packet;
+ // The main payload of this packet should be decoded as a primary
+ // payload, even if it comes as a secondary payload in a RED packet.
+ packet->primary = true;
+ Packet* new_packet = new Packet;
new_packet->header = packet->header;
int duration = decoder->
PacketDurationRedundant(packet->payload, packet->payload_length);