diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-21 05:50:41 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-21 05:50:41 +0000 |
commit | a19f5489713841c32f873a572092ec50692be81e (patch) | |
tree | 831202edd0636a862bd9cd7d4dff91ce647c290f | |
parent | 7aac25896a14b97d1f5d8b7b24f541b85ee5d63a (diff) | |
download | chromium_src-a19f5489713841c32f873a572092ec50692be81e.zip chromium_src-a19f5489713841c32f873a572092ec50692be81e.tar.gz chromium_src-a19f5489713841c32f873a572092ec50692be81e.tar.bz2 |
Merge 183299
> Satsify pending reads in media::GpuVideoDecoder before resetting.
>
> r171854 introduced a bug where pending_reset_cb_ was set prior to calling EnqueueFrameAndTriggerFrameDelivery(), resulting in nothing happening instead of running pending_read_cb_ as intended.
>
> BUG=175613
>
> Review URL: https://codereview.chromium.org/12285014
TBR=scherkus@chromium.org
Review URL: https://codereview.chromium.org/12314026
git-svn-id: svn://svn.chromium.org/chrome/branches/1364/src@183750 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | media/filters/gpu_video_decoder.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc index 133452e..66484b9 100644 --- a/media/filters/gpu_video_decoder.cc +++ b/media/filters/gpu_video_decoder.cc @@ -82,11 +82,8 @@ void GpuVideoDecoder::Reset(const base::Closure& closure) { // Throw away any already-decoded, not-yet-delivered frames. ready_video_frames_.clear(); - DCHECK(pending_reset_cb_.is_null()); - pending_reset_cb_ = BindToCurrentLoop(closure); - if (!vda_.get()) { - base::ResetAndReturn(&pending_reset_cb_).Run(); + gvd_loop_proxy_->PostTask(FROM_HERE, closure); return; } @@ -95,6 +92,9 @@ void GpuVideoDecoder::Reset(const base::Closure& closure) { if (!pending_read_cb_.is_null()) EnqueueFrameAndTriggerFrameDelivery(VideoFrame::CreateEmptyFrame()); + DCHECK(pending_reset_cb_.is_null()); + pending_reset_cb_ = BindToCurrentLoop(closure); + vda_loop_proxy_->PostTask(FROM_HERE, base::Bind( &VideoDecodeAccelerator::Reset, weak_vda_)); } |