| Index: media/filters/gpu_video_decoder.cc
|
| diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
|
| index e0d3191d1b2d8d0be1e661d975a8ca4039053c34..00f5f368acf8b5785d249483abcb9f0752f11eea 100644
|
| --- a/media/filters/gpu_video_decoder.cc
|
| +++ b/media/filters/gpu_video_decoder.cc
|
| @@ -220,6 +220,17 @@ void GpuVideoDecoder::Read(const ReadCB& read_cb) {
|
| }
|
| }
|
|
|
| +bool GpuVideoDecoder::CanMoreDecodeWorkBeDone() {
|
| +#if defined(OS_WIN)
|
| + // TODO(ananta): the DXVA decoder stymies our attempt to pipeline Decode()s by
|
| + // claiming to be done with previous work way too quickly. Until this is
|
| + // resolved we don't pipeline work. http://crbug.com/150925
|
| + return bitstream_buffers_in_decoder_.empty() && !pending_read_cb_.is_null();
|
| +#else
|
| + return bitstream_buffers_in_decoder_.size() < kMaxInFlightDecodes;
|
| +#endif
|
| +}
|
| +
|
| void GpuVideoDecoder::RequestBufferDecode(
|
| DemuxerStream::Status status,
|
| const scoped_refptr<DecoderBuffer>& buffer) {
|
| @@ -276,7 +287,7 @@ void GpuVideoDecoder::RequestBufferDecode(
|
| vda_loop_proxy_->PostTask(FROM_HERE, base::Bind(
|
| &VideoDecodeAccelerator::Decode, weak_vda_, bitstream_buffer));
|
|
|
| - if (bitstream_buffers_in_decoder_.size() < kMaxInFlightDecodes)
|
| + if (CanMoreDecodeWorkBeDone())
|
| EnsureDemuxOrDecode();
|
| }
|
|
|
| @@ -476,7 +487,7 @@ void GpuVideoDecoder::NotifyEndOfBitstreamBuffer(int32 id) {
|
| bitstream_buffers_in_decoder_.erase(it);
|
|
|
| if (pending_reset_cb_.is_null() && state_ != kDrainingDecoder &&
|
| - bitstream_buffers_in_decoder_.size() < kMaxInFlightDecodes) {
|
| + CanMoreDecodeWorkBeDone()) {
|
| EnsureDemuxOrDecode();
|
| }
|
| }
|
|
|