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: |