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

Unified Diff: media/base/null_video_sink.cc

Issue 2007463005: Paint first frame faster, don't crash with no frames during EOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whoops, fix comment. Created 4 years, 7 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 | « cc/resources/video_resource_updater.cc ('k') | media/base/null_video_sink_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/null_video_sink.cc
diff --git a/media/base/null_video_sink.cc b/media/base/null_video_sink.cc
index e96fdda240dcbc4beaa19a2286b6d6d63ce9413b..f390986394549d7ad06749257995ce1e377bff58 100644
--- a/media/base/null_video_sink.cc
+++ b/media/base/null_video_sink.cc
@@ -89,6 +89,9 @@ void NullVideoSink::CallRender() {
}
void NullVideoSink::PaintSingleFrame(const scoped_refptr<VideoFrame>& frame) {
+ if (frame == last_frame_)
+ return;
+ last_frame_ = frame;
new_frame_cb_.Run(frame);
}
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | media/base/null_video_sink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698