Index: content/common/gpu/media/gpu_video_decode_accelerator.cc |
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
index a0c9eb947e0c4ce283a153a7456baf265ce924d9..aabff7fafe7bd2df04cd413a4a60b8c088283872 100644 |
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc |
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
@@ -86,6 +86,13 @@ void GpuVideoDecodeAccelerator::NotifyEndOfStream() { |
void GpuVideoDecodeAccelerator::NotifyError( |
media::VideoDecodeAccelerator::Error error) { |
+ if (init_done_msg_) { |
+ // If we get an error while we're initializing, NotifyInitializeDone won't |
+ // be called, so we need to send the reply (with an error) here. |
+ init_done_msg_->set_reply_error(); |
+ Send(init_done_msg_); |
+ init_done_msg_ = NULL; |
+ } |
if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification( |
host_route_id_, error))) { |
LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) " |
@@ -110,6 +117,7 @@ void GpuVideoDecodeAccelerator::Initialize( |
video_decode_accelerator_->Initialize(configs); |
#else |
NOTIMPLEMENTED() << "HW video decode acceleration not available."; |
+ NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); |
#endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
} |