Index: webrtc/pc/channelmanager.cc |
diff --git a/webrtc/pc/channelmanager.cc b/webrtc/pc/channelmanager.cc |
index fb6f44f846d7acf50543ec83f491a22a84bc5b80..06475e9eaa26f13ec0883a1c8e8654675cbf8e9e 100644 |
--- a/webrtc/pc/channelmanager.cc |
+++ b/webrtc/pc/channelmanager.cc |
@@ -29,9 +29,6 @@ |
namespace cricket { |
-static bool IsRtxCodec(const VideoCodec& codec) { |
- return _stricmp(kRtxCodecName, codec.name.c_str()) == 0; |
-} |
using rtc::Bind; |
@@ -140,13 +137,18 @@ |
*ext = media_engine_->GetAudioCapabilities().header_extensions; |
} |
-std::vector<VideoCodec> ChannelManager::GetSupportedVideoCodecs() const { |
- std::vector<VideoCodec> codecs = media_engine_->video_codecs(); |
- if (!enable_rtx_) { |
- codecs.erase(std::remove_if(codecs.begin(), codecs.end(), &IsRtxCodec), |
- codecs.end()); |
- } |
- return codecs; |
+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) { |
+ continue; |
+ } |
+ codecs->push_back(*it); |
+ } |
} |
void ChannelManager::GetSupportedVideoRtpHeaderExtensions( |