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