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

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

Issue 763063004: Flush correctly in VTVideoDecodeAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Flush discarded sessions. Created 6 years 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 | « content/common/gpu/media/vt.sig ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vt_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.cc b/content/common/gpu/media/vt_video_decode_accelerator.cc
index 9a91c9c0f1400ac5f61045a74f3dc5309f7e8164..d4ad116c39304c12eca8c2894220897269aa7b20 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vt_video_decode_accelerator.cc
@@ -246,9 +246,10 @@ bool VTVideoDecodeAccelerator::Initialize(
bool VTVideoDecodeAccelerator::FinishDelayedFrames() {
DCHECK(decoder_thread_.message_loop_proxy()->BelongsToCurrentThread());
if (session_) {
- OSStatus status = VTDecompressionSessionFinishDelayedFrames(session_);
+ OSStatus status = VTDecompressionSessionWaitForAsynchronousFrames(session_);
DaleCurtis 2014/12/02 18:28:01 Does blocking the decoder thread for this prevent
sandersd (OOO until July 31) 2014/12/02 18:30:39 There are no necessary actions on the decoder thre
if (status) {
- NOTIFY_STATUS("VTDecompressionSessionFinishDelayedFrames()", status);
+ NOTIFY_STATUS("VTDecompressionSessionWaitForAsynchronousFrames()",
+ status);
return false;
}
}
@@ -318,7 +319,8 @@ bool VTVideoDecodeAccelerator::ConfigureDecoder() {
base::ScopedCFTypeRef<CFMutableDictionaryRef> image_config(
BuildImageConfig(coded_dimensions));
- // TODO(sandersd): Does the old session need to be flushed first?
+ if (!FinishDelayedFrames())
+ return false;
session_.reset();
status = VTDecompressionSessionCreate(
kCFAllocatorDefault,
« no previous file with comments | « content/common/gpu/media/vt.sig ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698