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..c4605c115c5b4a1b43cc839af97f5a81956d8955 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) |
+ |
+ // flush decoder after all BitstreamBuffer are processed |
+ if (encoded_data_next_pos_to_decode_ == encoded_data_.size() && |
+ outstanding_decodes_ == 0) { |
+ decoder_->Flush(); |
+ SetState(CS_FLUSHING); |
+ } else if (decode_calls_per_second_ == 0) |
DecodeNextFragment(); |
} |
@@ -743,10 +749,6 @@ void GLRenderingVDAClient::DecodeNextFragment() { |
if (decoder_deleted()) |
return; |
if (encoded_data_next_pos_to_decode_ == encoded_data_.size()) { |
Owen Lin
2015/01/14 06:25:51
Remove '{}'.
|
- if (outstanding_decodes_ == 0) { |
- decoder_->Flush(); |
- SetState(CS_FLUSHING); |
- } |
return; |
} |
size_t end_pos; |