Index: media/video/capture/file_video_capture_device.cc |
diff --git a/media/video/capture/file_video_capture_device.cc b/media/video/capture/file_video_capture_device.cc |
index 5a45b4a065cb7f82a79a7c1999d8465834bd8af7..295a35b30d7be116c0eeb7dd052ec198841a37f6 100644 |
--- a/media/video/capture/file_video_capture_device.cc |
+++ b/media/video/capture/file_video_capture_device.cc |
@@ -249,6 +249,10 @@ void FileVideoCaptureDevice::OnCaptureTask() { |
next_frame_time_ = current_time + frame_interval; |
} else { |
next_frame_time_ += frame_interval; |
+ // Don't accumulate any debt if we are lagging behind - just post next frame |
+ // immediately and continue as normal. |
+ if (next_frame_time_ < current_time) |
+ next_frame_time_ = current_time; |
} |
base::MessageLoop::current()->PostDelayedTask( |
FROM_HERE, |