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

Unified Diff: remoting/protocol/webrtc_video_stream.cc

Issue 2757923004: Fix failed capture handling in WebrtcVideoStream (Closed)
Patch Set: Created 3 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
Index: remoting/protocol/webrtc_video_stream.cc
diff --git a/remoting/protocol/webrtc_video_stream.cc b/remoting/protocol/webrtc_video_stream.cc
index 7450fb5cc04af6b8d5a3aacb4a0ba607ea208ffa..ab39c59b01866588ef871a238c129421e320e52a 100644
--- a/remoting/protocol/webrtc_video_stream.cc
+++ b/remoting/protocol/webrtc_video_stream.cc
@@ -143,6 +143,13 @@ void WebrtcVideoStream::OnCaptureResult(
captured_frame_timestamps_->capture_delay =
base::TimeDelta::FromMilliseconds(frame ? frame->capture_time_ms() : 0);
+ if (!frame) {
+ // Save event timestamps to be used for the next frame.
+ next_frame_input_event_timestamps_ =
+ captured_frame_timestamps_->input_event_timestamps;
+ captured_frame_timestamps_->input_event_timestamps = InputEventTimestamps();
+ }
+
WebrtcVideoEncoder::FrameParams frame_params;
if (!scheduler_->OnFrameCaptured(frame.get(), &frame_params)) {
return;
@@ -160,11 +167,6 @@ void WebrtcVideoStream::OnCaptureResult(
if (observer_)
observer_->OnVideoSizeChanged(this, frame_size_, frame_dpi_);
}
- } else {
- // Save event timestamps to be used for the next frame.
- next_frame_input_event_timestamps_ =
- captured_frame_timestamps_->input_event_timestamps;
- captured_frame_timestamps_->input_event_timestamps = InputEventTimestamps();
}
base::PostTaskAndReplyWithResult(

Powered by Google App Engine
This is Rietveld 408576698