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

Issue 2870043003: Handle padded audio packets correctly (Closed)

Created:
3 years, 7 months ago by hlundin-webrtc
Modified:
3 years, 7 months ago
CC:
webrtc-reviews_webrtc.org, danilchap, AleBzk, peah-webrtc, zhuangzesen_agora.io, stefan-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, kwiberg-webrtc, minyue-webrtc, mflodman
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Handle padded audio packets correctly RTP packets can be padded with extra data at the end of the payload. The usable payload length of the packet should then be reduced with the padding length, since the padding must be discarded. This was not the case; instead, the entire payload, including padding data, was forwarded to the audio channel and in the end to the decoder. A special case of padding is packets which are empty except for the padding. That is, they carry no usable payload. These packets are sometimes used for probing the network and were discarded in RTPReceiverAudio::ParseAudioCodecSpecific. The result is that NetEq never sees those empty packets, just the holes in the sequence number series; this can throw off the target buffer calculations. With this change, the empty (after removing the padding) packets are let through, all the way down to NetEq, to a new method called NetEq::InsertEmptyPacket. This method notifies the DelayManager that an empty packet was received. BUG=webrtc:7610, webrtc:7625 Review-Url: https://codereview.webrtc.org/2870043003 Cr-Commit-Position: refs/heads/master@{#18083} Committed: https://chromium.googlesource.com/external/webrtc/+/b8c55b15a3e1b5a4c71f4444208b15c9874a3db4

Patch Set 1 #

Patch Set 2 : Add TODO bug for NACK #

Total comments: 17

Patch Set 3 : Fix a minor comment #

Patch Set 4 : Second review #

Total comments: 1

Patch Set 5 : Account for padding length #

Total comments: 2

Patch Set 6 : const size_t #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -8 lines) Patch
M webrtc/modules/audio_coding/acm2/acm_receiver.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/acm2/audio_coding_module.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/delay_manager.h View 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/delay_manager.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc View 1 chunk +52 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/include/neteq.h View 1 chunk +6 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/mock/mock_delay_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc View 1 2 3 4 5 3 chunks +14 lines, -8 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
hlundin-webrtc
PTAL stefan: rtp_rtcp minyue: audio_coding Thanks!
3 years, 7 months ago (2017-05-09 12:33:52 UTC) #2
stefan-webrtc
lgtm
3 years, 7 months ago (2017-05-09 14:25:46 UTC) #3
minyue-webrtc
Good work. I will check with loopback call tomorrow. Take a look at my comments ...
3 years, 7 months ago (2017-05-09 21:04:07 UTC) #4
hlundin-webrtc
See replies inline, and a small change. https://codereview.webrtc.org/2870043003/diff/20001/webrtc/modules/audio_coding/acm2/audio_coding_module.cc File webrtc/modules/audio_coding/acm2/audio_coding_module.cc (right): https://codereview.webrtc.org/2870043003/diff/20001/webrtc/modules/audio_coding/acm2/audio_coding_module.cc#newcode1079 webrtc/modules/audio_coding/acm2/audio_coding_module.cc:1079: int AudioCodingModuleImpl::IncomingPacket(const ...
3 years, 7 months ago (2017-05-10 08:57:23 UTC) #5
kwiberg-webrtc
https://codereview.webrtc.org/2870043003/diff/20001/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc File webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc (right): https://codereview.webrtc.org/2870043003/diff/20001/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc#newcode237 webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc:237: RTC_DCHECK_GE(payload_length, (4 * n) + 2); On 2017/05/10 08:57:23, ...
3 years, 7 months ago (2017-05-10 09:22:51 UTC) #6
minyue-webrtc
https://codereview.webrtc.org/2870043003/diff/20001/webrtc/modules/audio_coding/acm2/audio_coding_module.cc File webrtc/modules/audio_coding/acm2/audio_coding_module.cc (right): https://codereview.webrtc.org/2870043003/diff/20001/webrtc/modules/audio_coding/acm2/audio_coding_module.cc#newcode1079 webrtc/modules/audio_coding/acm2/audio_coding_module.cc:1079: int AudioCodingModuleImpl::IncomingPacket(const uint8_t* incoming_payload, On 2017/05/10 08:57:23, hlundin-webrtc wrote: ...
3 years, 7 months ago (2017-05-10 09:44:12 UTC) #7
hlundin-webrtc
PTAL again. https://codereview.webrtc.org/2870043003/diff/20001/webrtc/modules/audio_coding/acm2/audio_coding_module.cc File webrtc/modules/audio_coding/acm2/audio_coding_module.cc (right): https://codereview.webrtc.org/2870043003/diff/20001/webrtc/modules/audio_coding/acm2/audio_coding_module.cc#newcode1088 webrtc/modules/audio_coding/acm2/audio_coding_module.cc:1088: rtp_header, On 2017/05/10 09:44:11, minyue-webrtc wrote: > ...
3 years, 7 months ago (2017-05-10 11:19:30 UTC) #8
minyue-webrtc
https://codereview.webrtc.org/2870043003/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc File webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc (right): https://codereview.webrtc.org/2870043003/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc#newcode215 webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc:215: if (payload_length == 0) { I tried it, and ...
3 years, 7 months ago (2017-05-10 13:03:18 UTC) #9
minyue-webrtc
lgtm nit and suggest add webrtc:7625 to Bug id. https://codereview.webrtc.org/2870043003/diff/80001/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc File webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc (right): https://codereview.webrtc.org/2870043003/diff/80001/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc#newcode216 webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc:216: ...
3 years, 7 months ago (2017-05-10 13:37:04 UTC) #12
hlundin-webrtc
https://codereview.webrtc.org/2870043003/diff/80001/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc File webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc (right): https://codereview.webrtc.org/2870043003/diff/80001/webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc#newcode216 webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.cc:216: size_t payload_data_length = On 2017/05/10 13:37:03, minyue-webrtc wrote: > ...
3 years, 7 months ago (2017-05-10 13:47:19 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2870043003/100001
3 years, 7 months ago (2017-05-10 13:47:32 UTC) #17
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 14:38:08 UTC) #20
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/external/webrtc/+/b8c55b15a3e1b5a4c71f44442...

Powered by Google App Engine
This is Rietveld 408576698