Index: talk/app/webrtc/peerconnection.cc |
diff --git a/talk/app/webrtc/peerconnection.cc b/talk/app/webrtc/peerconnection.cc |
index e7b33c43acdbd917ad549aac93df2611fd818475..3c0dc83aa387c21994fb0962308e39c86c9599a5 100644 |
--- a/talk/app/webrtc/peerconnection.cc |
+++ b/talk/app/webrtc/peerconnection.cc |
@@ -630,12 +630,14 @@ bool PeerConnection::Initialize( |
// No step delay is used while allocating ports. |
port_allocator_->set_step_delay(cricket::kMinimumStepDelay); |
+ media_controller_.reset(factory_->CreateMediaController()); |
+ |
remote_stream_factory_.reset(new RemoteMediaStreamFactory( |
- factory_->signaling_thread(), factory_->channel_manager())); |
+ factory_->signaling_thread(), media_controller_->channel_manager())); |
- session_.reset(new WebRtcSession( |
- factory_->channel_manager(), factory_->signaling_thread(), |
- factory_->worker_thread(), port_allocator_.get())); |
+ session_.reset( |
+ new WebRtcSession(media_controller_.get(), factory_->signaling_thread(), |
+ factory_->worker_thread(), port_allocator_.get())); |
stats_.reset(new StatsCollector(this)); |
// Initialize the WebRtcSession. It creates transport channels etc. |