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

Unified Diff: media/renderers/video_renderer_impl.cc

Issue 1005303004: media: VideoRenderImpl: display last available frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use std:min(time before next frame, 10ms) Created 5 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 | « no previous file | media/renderers/video_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/video_renderer_impl.cc
diff --git a/media/renderers/video_renderer_impl.cc b/media/renderers/video_renderer_impl.cc
index 0ad19e4348d702bade9856c1b37682469d307d1d..9f57f130d07694aff694e2d997268a1f9cba47ec 100644
--- a/media/renderers/video_renderer_impl.cc
+++ b/media/renderers/video_renderer_impl.cc
@@ -246,11 +246,13 @@ void VideoRendererImpl::ThreadMain() {
// Remain idle until we've reached our target paint window.
if (now < target_paint_timestamp) {
- UpdateStatsAndWait_Locked(kIdleTimeDelta);
+ UpdateStatsAndWait_Locked(
+ std::min(target_paint_timestamp - now, kIdleTimeDelta));
continue;
}
- if (now > latest_paint_timestamp && drop_frames_) {
+ if (ready_frames_.size() > 1 && now > latest_paint_timestamp &&
+ drop_frames_) {
DropNextReadyFrame_Locked();
continue;
}
« no previous file with comments | « no previous file | media/renderers/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698