Commit d03a7e7a authored by piman@chromium.org's avatar piman@chromium.org

Send error reply to GpuVideoDecodeAccelerator::Initialize when not available

BUG=None
TEST=Pepper Flash on x86 with HW decoder on


Review URL: http://codereview.chromium.org/7620003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96500 0039d316-1c4b-4281-b951-d872f2087c98
parent 3b49e574
...@@ -88,6 +88,13 @@ void GpuVideoDecodeAccelerator::NotifyEndOfStream() { ...@@ -88,6 +88,13 @@ void GpuVideoDecodeAccelerator::NotifyEndOfStream() {
void GpuVideoDecodeAccelerator::NotifyError( void GpuVideoDecodeAccelerator::NotifyError(
media::VideoDecodeAccelerator::Error error) { 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( if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification(
host_route_id_, error))) { host_route_id_, error))) {
LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) " LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) "
...@@ -112,6 +119,7 @@ void GpuVideoDecodeAccelerator::Initialize( ...@@ -112,6 +119,7 @@ void GpuVideoDecodeAccelerator::Initialize(
video_decode_accelerator_->Initialize(configs); video_decode_accelerator_->Initialize(configs);
#else #else
NOTIMPLEMENTED() << "HW video decode acceleration not available."; NOTIMPLEMENTED() << "HW video decode acceleration not available.";
NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
#endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) #endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment