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

Unified Diff: remoting/protocol/webrtc_frame_scheduler_simple.cc

Issue 2398993004: DrMemory: Avoid capture with no capture callback set (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_frame_scheduler_simple.cc
diff --git a/remoting/protocol/webrtc_frame_scheduler_simple.cc b/remoting/protocol/webrtc_frame_scheduler_simple.cc
index 6f6d94895cdd46ca8c16d4c97150423a4e3fc5e4..fa72a71255bc7950ef53efe6c9325e2e94c3e38f 100644
--- a/remoting/protocol/webrtc_frame_scheduler_simple.cc
+++ b/remoting/protocol/webrtc_frame_scheduler_simple.cc
@@ -44,7 +44,7 @@ void WebrtcFrameSchedulerSimple::Pause(bool pause) {
paused_ = pause;
if (paused_) {
capture_timer_.Stop();
- } else if (!capture_callback_.is_null()) {
+ } else {
ScheduleNextFrame(base::TimeTicks::Now());
}
}
@@ -112,8 +112,9 @@ void WebrtcFrameSchedulerSimple::OnFrameEncoded(
}
void WebrtcFrameSchedulerSimple::ScheduleNextFrame(base::TimeTicks now) {
- // Don't capture frames when paused or target bitrate is 0.
- if (paused_ || pacing_bucket_.rate() == 0)
+ // Don't capture frames when paused or target bitrate is 0 or there is
+ // no capture callback set.
+ if (paused_ || pacing_bucket_.rate() == 0 || capture_callback_.is_null())
return;
// If this is not the first frame then capture next frame after the previous
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698