diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-06 00:14:23 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-06 00:14:23 +0000 |
commit | 574eedcdeb1f43a7f26f647f2f4c87cb9cc73c35 (patch) | |
tree | 5acd964ebd67a244dff2e3237ff4affed63f342a /media | |
parent | 7f26c9ea2ea39c18d2d82a982b66ad63c06b9503 (diff) | |
download | chromium_src-574eedcdeb1f43a7f26f647f2f4c87cb9cc73c35.zip chromium_src-574eedcdeb1f43a7f26f647f2f4c87cb9cc73c35.tar.gz chromium_src-574eedcdeb1f43a7f26f647f2f4c87cb9cc73c35.tar.bz2 |
Fix for the video seek test failures seen on the windows perf av builders.
The seek tests started failing since revision 159552 which restricted the number of pending output video
samples from the DXVA decoder on Windows to 1. These tests after decoding a number of frames send over the
Flush call to the decoder and on receiving the Flush done notification, reset the decoder and then report the
seek times.
The tests failed presumably due to a timing issue which was exposed by restricting the number of pending output
samples from the decoder to 1, which caused the Flush operation in the DXVA decoder to take longer to complete.
The VideoRendererBase::Flush function in the renderer process invokes the GpuVideoDecoder::Reset function. This
function internally checks if the decoder is in the draining state and keeps posting a task which would run the
GpuVideoDecoder::Reset again. The GpuVideoDecoder would never come out of the draining state after this, because
the read callback is set to NULL, which means that any ready frames would continue to live.
The DXVA decoder on Windows would never come out of the draining state as it waits for picture frames to become
available which only happens when the ready frames in the renderer are consumed.
Fix is to drop the ready frames in the GpuVideoDecoder::Reset function if we are in the draining state.
BUG=153939
R=fischman
Review URL: https://chromiumcodereview.appspot.com/11068032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/gpu_video_decoder.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc index d556d1a..c7909e4 100644 --- a/media/filters/gpu_video_decoder.cc +++ b/media/filters/gpu_video_decoder.cc @@ -68,13 +68,22 @@ GpuVideoDecoder::GpuVideoDecoder( } void GpuVideoDecoder::Reset(const base::Closure& closure) { - if (!gvd_loop_proxy_->BelongsToCurrentThread() || - state_ == kDrainingDecoder) { + if (!gvd_loop_proxy_->BelongsToCurrentThread()) { gvd_loop_proxy_->PostTask(FROM_HERE, base::Bind( &GpuVideoDecoder::Reset, this, closure)); return; } + if (state_ == kDrainingDecoder) { + gvd_loop_proxy_->PostTask(FROM_HERE, base::Bind( + &GpuVideoDecoder::Reset, this, closure)); + // NOTE: if we're deferring Reset() until a Flush() completes, return + // queued pictures to the VDA so they can be used to finish that Flush(). + if (pending_read_cb_.is_null()) + ready_video_frames_.clear(); + return; + } + // Throw away any already-decoded, not-yet-delivered frames. ready_video_frames_.clear(); |