Revert "Avoid encrypting empty audio packet."
This reverts commit b0ac94307e1787f83de2b9a2dc3b58309ea8654b. Reason for revert: failing upstream tests Original change's description: > Avoid encrypting empty audio packet. > > Bug: b/132861665 > Change-Id: I161ba8697ae88857927f27fa6d3914b7201fdeab > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137049 > Commit-Queue: Minyue Li <minyue@webrtc.org> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#28006} TBR=brandtr@webrtc.org,kwiberg@webrtc.org,minyue@webrtc.org Change-Id: I856436ad78bcc5310810283bb5547070781d0684 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: b/132861665 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137518 Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Minyue Li <minyue@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28009}
This commit is contained in:
@ -495,15 +495,6 @@ int32_t ChannelSend::SendRtpAudio(AudioFrameType frameType,
|
|||||||
uint8_t payloadType,
|
uint8_t payloadType,
|
||||||
uint32_t timeStamp,
|
uint32_t timeStamp,
|
||||||
rtc::ArrayView<const uint8_t> payload) {
|
rtc::ArrayView<const uint8_t> payload) {
|
||||||
if (payload.empty()) {
|
|
||||||
if (frameType == AudioFrameType::kEmptyFrame) {
|
|
||||||
// we don't send empty audio RTP packets
|
|
||||||
// no error since we use it to drive DTMF when we use VAD
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_includeAudioLevelIndication) {
|
if (_includeAudioLevelIndication) {
|
||||||
// Store current audio level in the RTP sender.
|
// Store current audio level in the RTP sender.
|
||||||
// The level will be used in combination with voice-activity state
|
// The level will be used in combination with voice-activity state
|
||||||
|
@ -221,6 +221,14 @@ bool RTPSenderAudio::SendAudio(AudioFrameType frame_type,
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (payload_size == 0 || payload_data == NULL) {
|
||||||
|
if (frame_type == AudioFrameType::kEmptyFrame) {
|
||||||
|
// we don't send empty audio RTP packets
|
||||||
|
// no error since we use it to drive DTMF when we use VAD
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::unique_ptr<RtpPacketToSend> packet = rtp_sender_->AllocatePacket();
|
std::unique_ptr<RtpPacketToSend> packet = rtp_sender_->AllocatePacket();
|
||||||
packet->SetMarker(MarkerBit(frame_type, payload_type));
|
packet->SetMarker(MarkerBit(frame_type, payload_type));
|
||||||
|
Reference in New Issue
Block a user