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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2074983002: Immediately reset for vp8 when there's nothing to flush. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 b821aef3230d933b4ca8ada6cd3242b041debc06..c81728d5969afde50339a696739e33983d062a55 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -1268,7 +1268,8 @@ void AndroidVideoDecodeAccelerator::Reset() {
// Some VP8 files require complete MediaCodec drain before we can call
// MediaCodec.flush() or MediaCodec.reset(). http://crbug.com/598963.
- if (media_codec_ && codec_config_->codec_ == kCodecVP8) {
+ if (media_codec_ && codec_config_->codec_ == kCodecVP8 &&
+ !bitstream_buffers_in_decoder_.empty()) {
Tima Vaisburd 2016/06/16 23:01:34 What if the decoder stalled, i.e. no input for som
DaleCurtis 2016/06/16 23:20:47 Does it matter? I assume if the decoder has nothin
Tima Vaisburd 2016/06/16 23:47:29 If the decoder has nothing inside, we proceed to R
// Postpone ResetCodecState() after the drain.
StartCodecDrain(DRAIN_FOR_RESET);
} else {
« 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