Index: webrtc/media/engine/webrtcvideoengine2.cc |
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc |
index 9e7f5c4bd45fdb49a2493d94a6a83600073d88b2..7e7b21974805a39e3fc71b80af377c0bca5aaf61 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2.cc |
+++ b/webrtc/media/engine/webrtcvideoengine2.cc |
@@ -2278,19 +2278,19 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetRecvParameters( |
} |
void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RecreateWebRtcStream() { |
+ if (stream_) { |
+ call_->DestroyVideoReceiveStream(stream_); |
stefan-webrtc
2017/01/27 13:26:02
Should we set stream_ to nullptr here too just to
brandtr
2017/01/27 14:10:46
Might as well. Done.
|
+ } |
if (flexfec_stream_) { |
call_->DestroyFlexfecReceiveStream(flexfec_stream_); |
flexfec_stream_ = nullptr; |
} |
- if (stream_) { |
- call_->DestroyVideoReceiveStream(stream_); |
- } |
- stream_ = call_->CreateVideoReceiveStream(config_.Copy()); |
- stream_->Start(); |
if (IsFlexfecFieldTrialEnabled() && flexfec_config_.IsCompleteAndEnabled()) { |
flexfec_stream_ = call_->CreateFlexfecReceiveStream(flexfec_config_); |
flexfec_stream_->Start(); |
} |
+ stream_ = call_->CreateVideoReceiveStream(config_.Copy()); |
+ stream_->Start(); |
} |
void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders( |