| Index: webkit/plugins/ppapi/ppb_video_decoder_impl.cc
|
| diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
|
| index 57c4dbcb114efc9a0d3db099cc436ecf88ea4531..9c8b37e1f3c8261ba487259c0eb296e9ca46d88c 100644
|
| --- a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
|
| +++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
|
| @@ -104,7 +104,8 @@ int32_t PPB_VideoDecoder_Impl::Decode(
|
| bitstream_buffer->id,
|
| buffer->shared_memory()->handle(),
|
| static_cast<size_t>(bitstream_buffer->size));
|
| - SetBitstreamBufferCallback(bitstream_buffer->id, callback);
|
| + if (!SetBitstreamBufferCallback(bitstream_buffer->id, callback))
|
| + return PP_ERROR_BADARGUMENT;
|
|
|
| FlushCommandBuffer();
|
| platform_video_decoder_->Decode(decode_buffer);
|
| @@ -143,7 +144,8 @@ int32_t PPB_VideoDecoder_Impl::Flush(PP_CompletionCallback callback) {
|
| if (!platform_video_decoder_)
|
| return PP_ERROR_BADRESOURCE;
|
|
|
| - SetFlushCallback(callback);
|
| + if (!SetFlushCallback(callback))
|
| + return PP_ERROR_INPROGRESS;
|
|
|
| FlushCommandBuffer();
|
| platform_video_decoder_->Flush();
|
| @@ -154,7 +156,8 @@ int32_t PPB_VideoDecoder_Impl::Reset(PP_CompletionCallback callback) {
|
| if (!platform_video_decoder_)
|
| return PP_ERROR_BADRESOURCE;
|
|
|
| - SetResetCallback(callback);
|
| + if (!SetResetCallback(callback))
|
| + return PP_ERROR_INPROGRESS;
|
|
|
| FlushCommandBuffer();
|
| platform_video_decoder_->Reset();
|
|
|