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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2789773002: Defer AVDA codec creation during reset. (Closed)
Patch Set: Created 3 years, 9 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/gpu/android_video_decode_accelerator.cc
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
index 1eaeb37f4dc2763e7b96eccd1f05e29374969222..cacbfe42d23b40f7d3cdb94df0d2c59df8e4bda3 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -1179,7 +1179,8 @@ void AndroidVideoDecodeAccelerator::ResetCodecState() {
// If we've just completed a flush don't reset the codec yet. Instead defer
// until the next decode call. This prevents us from unbacking frames that
// might be out for display at end of stream.
- codec_needs_reset_ = drain_type_ == DRAIN_FOR_FLUSH;
+ codec_needs_reset_ =
+ (drain_type_ == DRAIN_FOR_FLUSH) || (drain_type_ == DRAIN_FOR_RESET);
if (codec_needs_reset_)
return;
« 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