Fix delivery error-checking missed in r6151.

Gets rid of quite a bit of false-warning logging in WebRtcVideoEngine2.

BUG=3228
R=perkj@webrtc.org
TBR=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/16529004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6183 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2014-05-16 11:38:45 +00:00
parent 57e060251a
commit 1e019d10b8

View File

@ -1206,9 +1206,11 @@ void WebRtcVideoChannel2::OnPacketReceived(
sp.ssrcs.push_back(ssrc);
AddRecvStream(sp);
if (!call_->Receiver()->DeliverPacket(
reinterpret_cast<const uint8_t*>(packet->data()), packet->length())) {
LOG(LS_WARNING) << "Failed to deliver RTP packet.";
if (call_->Receiver()->DeliverPacket(
reinterpret_cast<const uint8_t*>(packet->data()), packet->length()) !=
webrtc::PacketReceiver::DELIVERY_OK) {
LOG(LS_WARNING) << "Failed to deliver RTP packet after creating default "
"receiver.";
return;
}
}
@ -1216,8 +1218,9 @@ void WebRtcVideoChannel2::OnPacketReceived(
void WebRtcVideoChannel2::OnRtcpReceived(
talk_base::Buffer* packet,
const talk_base::PacketTime& packet_time) {
if (!call_->Receiver()->DeliverPacket(
reinterpret_cast<const uint8_t*>(packet->data()), packet->length())) {
if (call_->Receiver()->DeliverPacket(
reinterpret_cast<const uint8_t*>(packet->data()), packet->length()) !=
webrtc::PacketReceiver::DELIVERY_OK) {
LOG(LS_WARNING) << "Failed to deliver RTCP packet.";
}
}