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

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

Issue 900053002: Minor robustness improvements for VTVideoDecodeAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vt_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.cc b/content/common/gpu/media/vt_video_decode_accelerator.cc
index e18412c114c9ed80cda02d5dc3fa2bd22eab42b1..2504b25d6746cb707d3110364a6cd591337e87e9 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vt_video_decode_accelerator.cc
@@ -632,7 +632,8 @@ void VTVideoDecodeAccelerator::Output(
CVImageBufferRef image_buffer) {
if (status) {
NOTIFY_STATUS("Decoding", status);
- } else if (CFGetTypeID(image_buffer) != CVPixelBufferGetTypeID()) {
+ } else if (!image_buffer ||
DaleCurtis 2015/02/04 22:38:52 Needs a comment if this is unexpected.
+ (CFGetTypeID(image_buffer) != CVPixelBufferGetTypeID())) {
DLOG(ERROR) << "Decoded frame is not a CVPixelBuffer";
NotifyError(PLATFORM_FAILURE);
} else {
@@ -715,7 +716,10 @@ void VTVideoDecodeAccelerator::ProcessWorkQueues() {
switch (state_) {
case STATE_DECODING:
// TODO(sandersd): Batch where possible.
- while (ProcessReorderQueue() || ProcessTaskQueue());
+ while (state_ == STATE_DECODING) {
+ if (!ProcessReorderQueue() && !ProcessTaskQueue())
+ break;
+ }
return;
case STATE_ERROR:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698