From 3cdd4d57471e9d810214677a350bbd7ee319cb53 Mon Sep 17 00:00:00 2001 From: "Piotr (Peter) Slatala" Date: Thu, 28 Feb 2019 07:10:56 -0800 Subject: [PATCH] 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 Reviewed-by: Bjorn Mellem Reviewed-by: Minyue Li Commit-Queue: Peter Slatala Cr-Commit-Position: refs/heads/master@{#26904} --- audio/channel_send.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/audio/channel_send.cc b/audio/channel_send.cc index cefd2c32da..bb9b2ffcc2 100644 --- a/audio/channel_send.cc +++ b/audio/channel_send.cc @@ -497,6 +497,12 @@ int32_t ChannelSend::SendData(FrameType frameType, rtc::ArrayView 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 {