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

Unified Diff: remoting/client/plugin/pepper_video_renderer_3d.cc

Issue 2692383002: CRD Webapp intermittently crashes on some machines (Closed)
Patch Set: Created 3 years, 10 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: remoting/client/plugin/pepper_video_renderer_3d.cc
diff --git a/remoting/client/plugin/pepper_video_renderer_3d.cc b/remoting/client/plugin/pepper_video_renderer_3d.cc
index aff694a2a054a778ee4f28273e9d19eb40196ac9..4cd976def4596936c55bcbe7a14fa0a884169358 100644
--- a/remoting/client/plugin/pepper_video_renderer_3d.cc
+++ b/remoting/client/plugin/pepper_video_renderer_3d.cc
@@ -333,8 +333,14 @@ void PepperVideoRenderer3D::OnDecodeDone(int32_t result) {
}
void PepperVideoRenderer3D::GetNextPicture() {
- if (get_picture_pending_)
+ // Return early if |decoded_frames_| is empty or the decoder is already
+ // preparing a picture. If we call GetPicture() before a new frame has been
+ // prepared (i.e. |decoded_frames_| is populated), the OnPictureReady callback
+ // could be called before OnDecodeDone() is called which will cause a crash.
+ // See crbug.com/689229 for more details.
+ if (get_picture_pending_ || decoded_frames_.empty()) {
return;
+ }
int32_t result =
video_decoder_.GetPicture(callback_factory_.NewCallbackWithOutput(
« 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