| Index: webrtc/modules/audio_coding/neteq/tools/packet.cc
|
| diff --git a/webrtc/modules/audio_coding/neteq/tools/packet.cc b/webrtc/modules/audio_coding/neteq/tools/packet.cc
|
| index 0430933824e1c3303e51a78a696d5d6a0d4c1372..901aa850d539506ac5c9ab47b5abc4166904cdeb 100644
|
| --- a/webrtc/modules/audio_coding/neteq/tools/packet.cc
|
| +++ b/webrtc/modules/audio_coding/neteq/tools/packet.cc
|
| @@ -129,8 +129,13 @@ void Packet::DeleteRedHeaders(std::list<RTPHeader*>* headers) {
|
| bool Packet::ParseHeader(const RtpHeaderParser& parser) {
|
| bool valid_header = parser.Parse(
|
| payload_memory_.get(), static_cast<int>(packet_length_bytes_), &header_);
|
| - assert(valid_header);
|
| - if (!valid_header) {
|
| + // Special case for dummy packets that have padding marked in the RTP header.
|
| + // This causes the RTP header parser to report failure, but is fine in this
|
| + // context.
|
| + const bool header_only_with_padding =
|
| + (header_.headerLength == packet_length_bytes_ &&
|
| + header_.paddingLength > 0);
|
| + if (!valid_header && !header_only_with_padding) {
|
| return false;
|
| }
|
| assert(header_.headerLength <= packet_length_bytes_);
|
|
|