diff options
author | magjed <magjed@chromium.org> | 2015-06-08 15:28:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-08 22:28:55 +0000 |
commit | 078271fd89b75dacb85809c4496121e1fa10665f (patch) | |
tree | 1502754302244273c77d08f45b661b34b838dce0 /media/video/capture | |
parent | e00c06e9712f508b6529fb88ee1f2a4aa187566e (diff) | |
download | chromium_src-078271fd89b75dacb85809c4496121e1fa10665f.zip chromium_src-078271fd89b75dacb85809c4496121e1fa10665f.tar.gz chromium_src-078271fd89b75dacb85809c4496121e1fa10665f.tar.bz2 |
FileVideoCaptureDevice: If frames are lagging behind, don't try to catch up
BUG=492189
Review URL: https://codereview.chromium.org/1170573003
Cr-Commit-Position: refs/heads/master@{#333364}
Diffstat (limited to 'media/video/capture')
-rw-r--r-- | media/video/capture/file_video_capture_device.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/video/capture/file_video_capture_device.cc b/media/video/capture/file_video_capture_device.cc index 5a45b4a..295a35b 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, |