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

Unified Diff: media/renderers/video_renderer_impl.cc

Issue 2271423002: Update decoded frame counts when the sink isn't running. (Closed)
Patch Set: Created 4 years, 4 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 5e667a37c101cba9465250c54a3c0e73a141d720..6be94bc0099e1c4e3a187eca634d36085af28474 100644
--- a/media/renderers/video_renderer_impl.cc
+++ b/media/renderers/video_renderer_impl.cc
@@ -392,6 +392,10 @@ void VideoRendererImpl::FrameReady(VideoFrameStream::Status status,
// We may have removed all frames above and have reached end of stream.
MaybeFireEndedCallback_Locked(time_progressing_);
+ // Update statistics here instead of during Render() when the sink is stopped.
+ if (!sink_started_)
+ UpdateStats_Locked();
+
// Paint the first frame if possible and necessary. PaintSingleFrame() will
// ignore repeated calls for the same frame. Paint ahead of HAVE_ENOUGH_DATA
// to ensure the user sees the frame as early as possible.
« 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