Chromium Code Reviews| 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, |