Index: webrtc/media/engine/webrtcvideoengine2.cc |
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc |
index 3cacc7da82ba3ee32cdfa69abf271635df9ec98b..dfdae5ea99ad13ba2122f6465adf8dea6f94b8f8 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2.cc |
+++ b/webrtc/media/engine/webrtcvideoengine2.cc |
@@ -543,7 +543,6 @@ WebRtcVideoEngine2::WebRtcVideoEngine2() |
external_decoder_factory_(NULL), |
external_encoder_factory_(NULL) { |
LOG(LS_INFO) << "WebRtcVideoEngine2::WebRtcVideoEngine2()"; |
- video_codecs_ = GetSupportedCodecs(external_encoder_factory_); |
} |
WebRtcVideoEngine2::~WebRtcVideoEngine2() { |
@@ -566,8 +565,8 @@ WebRtcVideoChannel2* WebRtcVideoEngine2::CreateChannel( |
external_decoder_factory_); |
} |
-const std::vector<VideoCodec>& WebRtcVideoEngine2::codecs() const { |
- return video_codecs_; |
+const std::vector<VideoCodec> WebRtcVideoEngine2::codecs() const { |
+ return GetSupportedCodecs(external_encoder_factory_); |
} |
RtpCapabilities WebRtcVideoEngine2::GetCapabilities() const { |
@@ -614,8 +613,6 @@ void WebRtcVideoEngine2::SetExternalEncoderFactory( |
encoder_factory = simulcast_encoder_factory_.get(); |
} |
external_encoder_factory_ = encoder_factory; |
- |
- video_codecs_ = GetSupportedCodecs(encoder_factory); |
} |
static std::vector<VideoCodec> GetSupportedCodecs( |