Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: media/cast/video_receiver/video_receiver.cc

Issue 145443005: Fixes for memory and threading issues in cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cast/video_receiver/video_receiver.cc
diff --git a/media/cast/video_receiver/video_receiver.cc b/media/cast/video_receiver/video_receiver.cc
index 141c986f7e32b5654f863237878f9963cce9e92f..0ee93fd6f6a277f5ed87b765ba8c2fc43f215bce 100644
--- a/media/cast/video_receiver/video_receiver.cc
+++ b/media/cast/video_receiver/video_receiver.cc
@@ -13,6 +13,7 @@
#include "crypto/symmetric_key.h"
#include "media/cast/cast_defines.h"
#include "media/cast/framer/framer.h"
+#include "media/cast/rtcp/rtcp_sender.h"
#include "media/cast/video_receiver/video_decoder.h"
namespace media {
@@ -443,6 +444,7 @@ void VideoReceiver::CastFeedback(const RtcpCastMessage& cast_message) {
cast_environment_->Logging()->GetVideoRtcpRawData();
while (!video_logs.empty()) {
+ // TODO(hclam): Avoid calling begin() within a loop.
VideoRtcpRawMap::iterator it = video_logs.begin();
uint32 rtp_timestamp = it->first;
std::pair<VideoRtcpRawMap::iterator, VideoRtcpRawMap::iterator>
@@ -452,6 +454,8 @@ void VideoReceiver::CastFeedback(const RtcpCastMessage& cast_message) {
VideoRtcpRawMap::const_iterator event_it = frame_range.first;
for (; event_it != frame_range.second; ++event_it) {
+ if (!RtcpSender::IsReceiverEvent(event_it->second.type))
+ continue;
RtcpReceiverEventLogMessage event_log_message;
event_log_message.type = event_it->second.type;
event_log_message.event_timestamp = event_it->second.timestamp;
« no previous file with comments | « media/cast/video_receiver/video_decoder_unittest.cc ('k') | media/cast/video_receiver/video_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698