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

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: 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 3d162aed0867cbec8a1f1143dc234cb7a4f2bed2..cb1c0637d951cacfd584a42daa39280c9d95b131 100644
--- a/media/gpu/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi_video_decode_accelerator.cc
@@ -798,10 +798,15 @@ 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. In this case we do not
+ // change state and post DeocdeTask(). The stream will be resumed in
Pawel Osciak 2016/07/19 07:26:08 s/DeocdeTask/DecodeTask/
+ // FinishReset().
+ if (state_ != kResetting) {
Pawel Osciak 2016/07/19 07:26:08 Could we be in kFlushing? Should we also consider
johnylin1 2016/07/19 08:04:41 Yes, I found out that the same issue may be encoun
+ 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