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

Unified Diff: content/renderer/media/webrtc/media_stream_remote_video_source.cc

Issue 1476523005: Verify returned frames from media::VideoFrame::Wrap*() methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: halliwell@ comments. Created 4 years, 11 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
Index: content/renderer/media/webrtc/media_stream_remote_video_source.cc
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.cc b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
index 6eab00b32a5b7b275995d879f966b2c991f5b944..88ceba3a97af4fd98857488b455a2cd10d53b001 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
@@ -115,6 +115,8 @@ void MediaStreamRemoteVideoSource::RemoteVideoSourceDelegate::RenderFrame(
const_cast<uint8_t*>(frame->GetYPlane()),
const_cast<uint8_t*>(frame->GetUPlane()),
const_cast<uint8_t*>(frame->GetVPlane()), elapsed_timestamp);
+ if (!video_frame)
+ return;
video_frame->AddDestructionObserver(
base::Bind(&base::DeletePointer<cricket::VideoFrame>, frame->Copy()));
}
« no previous file with comments | « content/renderer/media/video_track_adapter.cc ('k') | content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698