Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(853)

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 1840043005: Don't reconfigure the encoder if the video options aren't changing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removing whitespace Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.cc ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index cd05f8e6ff5bbe48c820639f10477c8e88dc3306..a57fbc7f5d90ffb616b10ce47560a365c9bb8f92 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -1693,10 +1693,13 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::SetOptions(
const VideoOptions& options) {
rtc::CritScope cs(&lock_);
+ VideoOptions old_options = parameters_.options;
parameters_.options.SetAll(options);
// Reconfigure encoder settings on the next frame or stream
- // recreation.
- pending_encoder_reconfiguration_ = true;
+ // recreation if the options changed.
+ if (parameters_.options != old_options) {
+ pending_encoder_reconfiguration_ = true;
+ }
}
webrtc::VideoCodecType CodecTypeFromName(const std::string& name) {
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.cc ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698