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

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 issue in video unit test that Flush/Reset is not reached 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
« no previous file with comments | « 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..c4d02dffa44e3e259658c2ccbb0b0d58d9e620c6 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -546,7 +546,12 @@ void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer(
// VaapiVideoDecodeAccelerator::FinishReset()).
++num_done_bitstream_buffers_;
--outstanding_decodes_;
- if (decode_calls_per_second_ == 0)
+ if (decode_calls_per_second_ == 0
+ // when decode speed is slow, a BitstreamBuffer is released after the
Alexei Svitkine (slow) 2014/12/09 14:27:35 Nit: Comments should be full sentences.
+ // EOS-DecodeNextFragment(),
+ // trigger DecodeNextFragment again (it will flush decode)
+ || (encoded_data_next_pos_to_decode_ == encoded_data_.size()
Alexei Svitkine (slow) 2014/12/09 14:27:36 Nit: When wrapping, operators (e.g. || and &&) sho
+ && outstanding_decodes_ == 0))
DecodeNextFragment();
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698