Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Unified Diff: content/common/gpu/media/video_decode_accelerator_unittest.cc

Issue 791573002: fix video_decode_accelerator_unittest issue when decode speed is slow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix video_decode_accelerator_unittest issue when decode speed is slow Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« AUTHORS ('K') | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ?
}
« AUTHORS ('K') | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698