Chromium Code Reviews| Index: media/capture/video/linux/v4l2_capture_delegate.cc |
| diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc |
| index 2f16c203996b82851c6181e67ac4a3f07b96c8a6..baa2e9f1f30f821fc8c9fd6c9bd8c7077ccf44f1 100644 |
| --- a/media/capture/video/linux/v4l2_capture_delegate.cc |
| +++ b/media/capture/video/linux/v4l2_capture_delegate.cc |
| @@ -506,7 +506,8 @@ void V4L2CaptureDelegate::AllocateAndStart( |
| // Post task to start fetching frames from v4l2. |
| v4l2_task_runner_->PostTask( |
| - FROM_HERE, base::Bind(&V4L2CaptureDelegate::DoCapture, this)); |
| + FROM_HERE, |
| + base::Bind(&V4L2CaptureDelegate::DoCapture, base::Unretained(this))); |
|
mcasas
2017/04/11 17:17:34
How would you guarantee that |this| is alive
when
Chandan
2017/04/11 19:46:43
Need to use weak pointer then? What do you suggest
|
| } |
| void V4L2CaptureDelegate::StopAndDeAllocate() { |
| @@ -820,7 +821,8 @@ void V4L2CaptureDelegate::DoCapture() { |
| } |
| v4l2_task_runner_->PostTask( |
| - FROM_HERE, base::Bind(&V4L2CaptureDelegate::DoCapture, this)); |
| + FROM_HERE, |
| + base::Bind(&V4L2CaptureDelegate::DoCapture, base::Unretained(this))); |
| } |
| void V4L2CaptureDelegate::SetErrorState( |