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

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

Issue 19775013: Pass a WeakPtr of the decoder_ to prevent SEGFAULT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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: content/common/gpu/media/video_decode_accelerator_unittest.cc
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index 439fb49453af4b6ecbdfce8138a76978159c08cf..ce5502e20a51c72746733ecbef47e7c00ddde099 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -485,7 +485,7 @@ void GLRenderingVDAClient::PictureReady(const media::Picture& picture) {
if (num_decoded_frames_ > delay_reuse_after_frame_num_) {
base::MessageLoop::current()->PostDelayedTask(FROM_HERE, base::Bind(
&VideoDecodeAccelerator::ReusePictureBuffer,
- base::Unretained(decoder_.get()), picture.picture_buffer_id()),
+ decoder_->AsWeakPtr(), picture.picture_buffer_id()),
base::TimeDelta::FromMilliseconds(kReuseDelayMs));
} else {
decoder_->ReusePictureBuffer(picture.picture_buffer_id());
« 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