| Index: media/video/capture/mac/video_capture_device_mac.mm
|
| diff --git a/media/video/capture/mac/video_capture_device_mac.mm b/media/video/capture/mac/video_capture_device_mac.mm
|
| index 1ae1ba284eca4790fc0e5d42a7e149e88ccd4725..7b880377e5e83b632ffb21bd957f060b7bf35440 100644
|
| --- a/media/video/capture/mac/video_capture_device_mac.mm
|
| +++ b/media/video/capture/mac/video_capture_device_mac.mm
|
| @@ -125,9 +125,8 @@ VideoCaptureDeviceMac::VideoCaptureDeviceMac(const Name& device_name)
|
| tried_to_square_pixels_(false),
|
| task_runner_(base::MessageLoopProxy::current()),
|
| state_(kNotInitialized),
|
| - weak_factory_(this),
|
| - weak_this_(weak_factory_.GetWeakPtr()),
|
| - capture_device_(nil) {
|
| + capture_device_(nil),
|
| + weak_factory_(this) {
|
| final_resolution_selected_ = AVFoundationGlue::IsAVFoundationSupported();
|
| }
|
|
|
| @@ -313,8 +312,9 @@ void VideoCaptureDeviceMac::ReceiveFrame(
|
|
|
| void VideoCaptureDeviceMac::ReceiveError(const std::string& reason) {
|
| task_runner_->PostTask(FROM_HERE,
|
| - base::Bind(&VideoCaptureDeviceMac::SetErrorState, weak_this_,
|
| - reason));
|
| + base::Bind(&VideoCaptureDeviceMac::SetErrorState,
|
| + weak_factory_.GetWeakPtr(),
|
| + reason));
|
| }
|
|
|
| void VideoCaptureDeviceMac::SetErrorState(const std::string& reason) {
|
|
|