Index: webrtc/media/engine/webrtcvideoengine2.cc |
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc |
index c192b52402ee95ef3f2ffd9dbe25f65ded5ecf6d..8c6bd848fc18076539cee73cece1655e3629e073 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2.cc |
+++ b/webrtc/media/engine/webrtcvideoengine2.cc |
@@ -1612,7 +1612,12 @@ bool WebRtcVideoChannel2::WebRtcVideoSendStream::SetVideoSend( |
if (options_present) { |
VideoOptions old_options = parameters_.options; |
parameters_.options.SetAll(*options); |
- if (parameters_.options != old_options) { |
+ if (parameters_.options.is_screencast.value_or(false) != |
+ old_options.is_screencast.value_or(false)) { |
+ // If screen content settings change, we may need to recreate the |
+ // stream so that the correct encoder is created. |
pthatcher1
2017/02/21 23:00:34
This could use a little more detail about why it's
|
+ RecreateWebRtcStream(); |
+ } else { |
pthatcher1
2017/02/21 23:00:34
Shouldn't this be "else if (parameters_.options !=
Taylor Brandstetter
2017/02/22 00:27:24
+1
sprang_webrtc
2017/02/22 15:53:04
Yes, I screwed up copy/paste from a chromium check
|
ReconfigureEncoder(); |
} |
} |