| 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(
|
|
|