From a67ca1a3bb69d5237ce7cf8e62ceb5ad37c49785 Mon Sep 17 00:00:00 2001 From: "honghaiz@google.com" Date: Wed, 28 Jan 2015 19:48:33 +0000 Subject: [PATCH] Only report the first rtp packet because it indicates the media has started flowing. BUG= R=juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/37829004 Cr-Commit-Position: refs/heads/master@{#8189} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8189 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/session/media/channel.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/talk/session/media/channel.cc b/talk/session/media/channel.cc index dbcdbb06b3..b47676e271 100644 --- a/talk/session/media/channel.cc +++ b/talk/session/media/channel.cc @@ -554,7 +554,9 @@ void BaseChannel::HandlePacket(bool rtcp, rtc::Buffer* packet, return; } - if (!has_received_packet_) { + // We are only interested in the first rtp packet because that + // indicates the media has started flowing. + if (!has_received_packet_ && !rtcp) { has_received_packet_ = true; signaling_thread()->Post(this, MSG_FIRSTPACKETRECEIVED); }