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

Unified Diff: media/gpu/vaapi_video_decode_accelerator.cc

Issue 2151183002: Skip posting DecodeTask of resolution changing while resetting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip posting DecodeTask of resolution changing while resetting Created 4 years, 5 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/vaapi_video_decode_accelerator.cc
diff --git a/media/gpu/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi_video_decode_accelerator.cc
index a92e7577de2ece482a4502cf7c1e027940221364..58d0b8f3df5159b07b13a689dcd84a7a3cd180ea 100644
--- a/media/gpu/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi_video_decode_accelerator.cc
@@ -811,10 +811,14 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers(
surfaces_available_.Signal();
}
- state_ = kDecoding;
- decoder_thread_task_runner_->PostTask(
- FROM_HERE, base::Bind(&VaapiVideoDecodeAccelerator::DecodeTask,
- base::Unretained(this)));
+ // The resolution changing may happen while resetting or flushing. In this
+ // case we do not change state and post DecodeTask().
+ if (state_ != kResetting && state_ != kFlushing) {
johnylin1 2016/07/20 02:50:43 I ran overnight for AdaptivePlaybackTest#testH264_
Pawel Osciak 2016/07/20 04:28:34 Please also test with video_VideoSeek.
+ state_ = kDecoding;
+ decoder_thread_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&VaapiVideoDecodeAccelerator::DecodeTask,
+ base::Unretained(this)));
+ }
}
#if defined(USE_OZONE)
« 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