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

Unified Diff: media/gpu/dxva_video_decode_accelerator_win.cc

Issue 2366213004: Allow resetting DXVAVDA while it's currently flushing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ensure notify happens 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/dxva_video_decode_accelerator_win.cc
diff --git a/media/gpu/dxva_video_decode_accelerator_win.cc b/media/gpu/dxva_video_decode_accelerator_win.cc
index 5f730e80d3eb6b5b3283a39b97254d6afdef1398..a92b1dd5b559534480af4a960156fa5bab5b0f71 100644
--- a/media/gpu/dxva_video_decode_accelerator_win.cc
+++ b/media/gpu/dxva_video_decode_accelerator_win.cc
@@ -1001,12 +1001,15 @@ void DXVAVideoDecodeAccelerator::Reset() {
DVLOG(1) << "DXVAVideoDecodeAccelerator::Reset";
State state = GetState();
- RETURN_AND_NOTIFY_ON_FAILURE((state == kNormal || state == kStopped),
- "Reset: invalid state: " << state,
- ILLEGAL_STATE, );
+ RETURN_AND_NOTIFY_ON_FAILURE(
+ (state == kNormal || state == kStopped || state == kFlushing),
+ "Reset: invalid state: " << state, ILLEGAL_STATE, );
decoder_thread_.Stop();
+ if (state == kFlushing)
+ NotifyFlushDone();
+
SetState(kResetting);
// If we have pending output frames waiting for display then we drop those
« 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