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

Unified Diff: content/common/gpu/media/dxva_video_decode_accelerator.cc

Issue 10827308: H/W decoded H.264 videos would not play at times on Windows 8. This was because the DXVA decoder in… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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: content/common/gpu/media/dxva_video_decode_accelerator.cc
===================================================================
--- content/common/gpu/media/dxva_video_decode_accelerator.cc (revision 151134)
+++ content/common/gpu/media/dxva_video_decode_accelerator.cc (working copy)
@@ -584,6 +584,21 @@
inputs_before_decode_++;
HRESULT hr = decoder_->ProcessInput(0, sample, 0);
+ // As per msdn if the decoder returns MF_E_NOTACCEPTING then it means that it
+ // has enough data to produce an output sample. In this case the recommended
+ // options are to
+ // 1. Generate new output by calling IMFTransform::ProcessOutput
+ // 2. Flush the input data
+ // We implement the first option, i.e to retrieve the output sample and then
+ // process the input again. Failure in either of these steps is treated as a
+ // decoder failure.
+ if (hr == MF_E_NOTACCEPTING) {
+ DoDecode();
+ RETURN_AND_NOTIFY_ON_FAILURE((state_ == kStopped || state_ == kNormal),
+ "Failed to process output. Unexpected decoder state: " << state_,
+ PLATFORM_FAILURE,);
+ hr = decoder_->ProcessInput(0, sample, 0);
+ }
RETURN_AND_NOTIFY_ON_HR_FAILURE(hr, "Failed to process input sample",
PLATFORM_FAILURE,);
« 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