| Index: ppapi/proxy/video_decoder_resource.cc
|
| diff --git a/ppapi/proxy/video_decoder_resource.cc b/ppapi/proxy/video_decoder_resource.cc
|
| index d430edce9d71a2ea8e4bcb4e416431d27f2188fd..733e6f86f53e22f4935c3e2ae98baab32ba6609f 100644
|
| --- a/ppapi/proxy/video_decoder_resource.cc
|
| +++ b/ppapi/proxy/video_decoder_resource.cc
|
| @@ -107,7 +107,7 @@ int32_t VideoDecoderResource::Initialize(
|
| return PP_ERROR_FAILED;
|
| if (profile < 0 || profile > PP_VIDEOPROFILE_MAX)
|
| return PP_ERROR_BADARGUMENT;
|
| - if (initialize_callback_)
|
| + if (initialize_callback_.get())
|
| return PP_ERROR_INPROGRESS;
|
| if (!graphics_context)
|
| return PP_ERROR_BADRESOURCE;
|
| @@ -153,9 +153,9 @@ int32_t VideoDecoderResource::Decode(uint32_t decode_id,
|
| scoped_refptr<TrackedCallback> callback) {
|
| if (decoder_last_error_)
|
| return decoder_last_error_;
|
| - if (flush_callback_ || reset_callback_)
|
| + if (flush_callback_.get() || reset_callback_.get())
|
| return PP_ERROR_FAILED;
|
| - if (decode_callback_)
|
| + if (decode_callback_.get())
|
| return PP_ERROR_INPROGRESS;
|
| if (size > kMaximumBitstreamBufferSize)
|
| return PP_ERROR_NOMEMORY;
|
| @@ -254,9 +254,9 @@ int32_t VideoDecoderResource::GetPicture(
|
| scoped_refptr<TrackedCallback> callback) {
|
| if (decoder_last_error_)
|
| return decoder_last_error_;
|
| - if (reset_callback_)
|
| + if (reset_callback_.get())
|
| return PP_ERROR_FAILED;
|
| - if (get_picture_callback_)
|
| + if (get_picture_callback_.get())
|
| return PP_ERROR_INPROGRESS;
|
|
|
| // If the next picture is ready, return it synchronously.
|
| @@ -280,9 +280,9 @@ void VideoDecoderResource::RecyclePicture(const PP_VideoPicture* picture) {
|
| int32_t VideoDecoderResource::Flush(scoped_refptr<TrackedCallback> callback) {
|
| if (decoder_last_error_)
|
| return decoder_last_error_;
|
| - if (reset_callback_)
|
| + if (reset_callback_.get())
|
| return PP_ERROR_FAILED;
|
| - if (flush_callback_)
|
| + if (flush_callback_.get())
|
| return PP_ERROR_INPROGRESS;
|
| flush_callback_ = callback;
|
|
|
| @@ -297,9 +297,9 @@ int32_t VideoDecoderResource::Flush(scoped_refptr<TrackedCallback> callback) {
|
| int32_t VideoDecoderResource::Reset(scoped_refptr<TrackedCallback> callback) {
|
| if (decoder_last_error_)
|
| return decoder_last_error_;
|
| - if (flush_callback_)
|
| + if (flush_callback_.get())
|
| return PP_ERROR_FAILED;
|
| - if (reset_callback_)
|
| + if (reset_callback_.get())
|
| return PP_ERROR_INPROGRESS;
|
| reset_callback_ = callback;
|
|
|
| @@ -455,7 +455,7 @@ void VideoDecoderResource::OnPluginMsgDecodeComplete(
|
| // Make the shm buffer available.
|
| available_shm_buffers_.push_back(shm_buffers_[shm_id]);
|
| // If the plugin is waiting, let it call Decode again.
|
| - if (decode_callback_) {
|
| + if (decode_callback_.get()) {
|
| scoped_refptr<TrackedCallback> callback;
|
| callback.swap(decode_callback_);
|
| callback->Run(PP_OK);
|
| @@ -467,7 +467,7 @@ void VideoDecoderResource::OnPluginMsgFlushComplete(
|
| // All shm buffers should have been made available by now.
|
| DCHECK_EQ(shm_buffers_.size(), available_shm_buffers_.size());
|
|
|
| - if (get_picture_callback_) {
|
| + if (get_picture_callback_.get()) {
|
| scoped_refptr<TrackedCallback> callback;
|
| callback.swap(get_picture_callback_);
|
| callback->Abort();
|
|
|