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

Unified Diff: media/base/null_video_sink.cc

Issue 2282963002: Do not use NullVideoSink::new_frame_cb_ if NULL. (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 | no next file » | 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 6e03e53eaa0fe69428ef2c2f43340754563b0983..7a5c54da09a1d3852bbc76ac2bfc1ad2c8ac09a3 100644
--- a/media/base/null_video_sink.cc
+++ b/media/base/null_video_sink.cc
@@ -92,8 +92,10 @@ void NullVideoSink::PaintSingleFrame(const scoped_refptr<VideoFrame>& frame,
bool repaint_duplicate_frame) {
if (!repaint_duplicate_frame && frame == last_frame_)
return;
+
last_frame_ = frame;
- new_frame_cb_.Run(frame);
+ if (!new_frame_cb_.is_null())
+ new_frame_cb_.Run(frame);
}
} // namespace media
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698