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

Unified Diff: webrtc/pc/channelmanager.cc

Issue 2521393004: Don't cache video codec list in VideoEngine2. (Closed)
Patch Set: Remove unnecessary test fixture and minor fixes. Created 4 years, 1 month 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
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channelmanager.cc
diff --git a/webrtc/pc/channelmanager.cc b/webrtc/pc/channelmanager.cc
index 06475e9eaa26f13ec0883a1c8e8654675cbf8e9e..255730a0ba4a9da381337c4c589b7f682b06205b 100644
--- a/webrtc/pc/channelmanager.cc
+++ b/webrtc/pc/channelmanager.cc
@@ -141,13 +141,13 @@ void ChannelManager::GetSupportedVideoCodecs(
std::vector<VideoCodec>* codecs) const {
codecs->clear();
- std::vector<VideoCodec>::const_iterator it;
- for (it = media_engine_->video_codecs().begin();
- it != media_engine_->video_codecs().end(); ++it) {
- if (!enable_rtx_ && _stricmp(kRtxCodecName, it->name.c_str()) == 0) {
+ std::vector<VideoCodec> video_codecs = media_engine_->video_codecs();
+ for (const auto& video_codec : video_codecs) {
+ if (!enable_rtx_ &&
+ _stricmp(kRtxCodecName, video_codec.name.c_str()) == 0) {
continue;
}
- codecs->push_back(*it);
+ codecs->push_back(video_codec);
}
}
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698