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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 2344703003: GpuVideoDecoder now propagates errors during Flush() (Closed)
Patch Set: Created 4 years, 3 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: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index 375a64940d1602f6c174a26801bfa70be138800b..339d5910cd6f36115b88e12344c88f6fe55d57ab 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -787,8 +787,6 @@ void GpuVideoDecoder::NotifyError(media::VideoDecodeAccelerator::Error error) {
if (!vda_)
return;
- state_ = kError;
-
// If we have any bitstream buffers, then notify one that an error has
// occurred. This guarantees that somebody finds out about the error. If
// we don't do this, and if the max decodes are already in flight, then there
@@ -799,6 +797,11 @@ void GpuVideoDecoder::NotifyError(media::VideoDecodeAccelerator::Error error) {
bitstream_buffers_in_decoder_.erase(it);
}
+ if (state_ == kDrainingDecoder)
+ base::ResetAndReturn(&eos_decode_cb_).Run(DecodeStatus::DECODE_ERROR);
+
+ state_ = kError;
+
DLOG(ERROR) << "VDA Error: " << error;
UMA_HISTOGRAM_ENUMERATION("Media.GpuVideoDecoderError", error,
media::VideoDecodeAccelerator::ERROR_MAX + 1);
« 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