Chromium Code Reviews| Index: content/common/gpu/media/video_decode_accelerator_unittest.cc |
| diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc |
| index 8b89d049b9339115a642f008e93f3796be83eb12..93baeaed8ce8bc6d21f3cfd0b98cc39956954035 100644 |
| --- a/content/common/gpu/media/video_decode_accelerator_unittest.cc |
| +++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc |
| @@ -546,7 +546,13 @@ void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer( |
| // VaapiVideoDecodeAccelerator::FinishReset()). |
| ++num_done_bitstream_buffers_; |
| --outstanding_decodes_; |
| - if (decode_calls_per_second_ == 0) |
| + if (decode_calls_per_second_ == 0 || |
| + // when decoding speed is slow, some BitstreamBuffer may be released |
|
Owen Lin
2015/01/08 06:26:08
s/when/When/
s/speed//
|
| + // after DecodeNextFragment process to the end; which means |
| + // outstanding_decodes_ is not zero at that time. |
|
Owen Lin
2015/01/08 06:26:08
|outstanding_decodes_|
|
| + // we need trigger DecodeNextFragment another time to flush decode. |
|
Owen Lin
2015/01/08 06:26:08
In order to flush the decoder, we need trigger Dec
|
| + (encoded_data_next_pos_to_decode_ == encoded_data_.size() && |
| + outstanding_decodes_ == 0)) |
| DecodeNextFragment(); |
|
Owen Lin
2015/01/08 06:26:08
How could you prevent to flush the decoder twice ?
|
| } |