Fix: Ignore empty frames in Media Transport

This is a stop-gap fix when empty frame is send, the channel_send.cc:69
check is triggered.

We can add support for sending empty frames in media transport (it
wouldn't be backward compatible) and at this point it's not clear
whether we need empty frames in audio path.

(no tests because there are no channel_send_*test* and this is not a final solution anyway)

Bug: webrtc:9719
Change-Id: Ib1e1da91eff670ac5b139700c51575c53f707529
Reviewed-on: https://webrtc-review.googlesource.com/c/124761
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26904}
This commit is contained in:
Piotr (Peter) Slatala 2019-02-28 07:10:56 -08:00 committed by Commit Bot
parent 26c59ff6ca
commit 3cdd4d5747

View File

@ -497,6 +497,12 @@ int32_t ChannelSend::SendData(FrameType frameType,
rtc::ArrayView<const uint8_t> payload(payloadData, payloadSize);
if (media_transport() != nullptr) {
if (frameType == kEmptyFrame) {
// TODO(bugs.webrtc.org/9719): Media transport Send doesn't support
// sending empty frames.
return 0;
}
return SendMediaTransportAudio(frameType, payloadType, timeStamp, payload,
fragmentation);
} else {