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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2332253004: Don't require free PicturBuffers when draining AVDA for destroy. (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/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 06298d81bc767142eeb2dcfdd64beb80b0dab754..6e371786589982a5ba4098ef709b199eef6986f5 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -724,9 +724,17 @@ bool AndroidVideoDecodeAccelerator::DequeueOutput() {
base::AutoReset<bool> auto_reset(&defer_errors_, true);
if (state_ == ERROR || state_ == WAITING_FOR_CODEC)
return false;
- if (picturebuffers_requested_ && output_picture_buffers_.empty())
+ // If we're draining for reset or destroy, then we don't need picture buffers
+ // since we won't send any decoded frames anyway. There might not be any,
+ // since the pipeline might not be sending them back and / or they don't
+ // exist anymore. From the pipeline's point of view, for Destroy at least,
+ // the VDA is already gone.
+ if (picturebuffers_requested_ && output_picture_buffers_.empty() &&
+ !IsDrainingForResetOrDestroy()) {
return false;
- if (!output_picture_buffers_.empty() && free_picture_ids_.empty()) {
+ }
+ if (!output_picture_buffers_.empty() && free_picture_ids_.empty() &&
+ !IsDrainingForResetOrDestroy()) {
// Don't have any picture buffer to send. Need to wait.
return false;
}
« 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