Chromium Code Reviews| Index: webrtc/test/vcm_capturer.cc |
| diff --git a/webrtc/test/vcm_capturer.cc b/webrtc/test/vcm_capturer.cc |
| index 0a82236c9880487968c147938ecca7c8b83f26f9..b2f6f559178cb58041c10d4646b42feabb07f184 100644 |
| --- a/webrtc/test/vcm_capturer.cc |
| +++ b/webrtc/test/vcm_capturer.cc |
| @@ -34,6 +34,8 @@ bool VcmCapturer::Init(size_t width, size_t height, size_t target_fps) { |
| } |
| vcm_ = webrtc::VideoCaptureFactory::Create(0, unique_name); |
| + vcm_->AddRef(); |
|
pbos-webrtc
2015/11/26 17:12:12
Shouldn't this be done inside ::Create() maybe? Cr
|
| + |
| vcm_->RegisterCaptureDataCallback(*this); |
| device_info->GetCapability(vcm_->CurrentDeviceName(), 0, capability_); |
| @@ -87,8 +89,6 @@ void VcmCapturer::Destroy() { |
| vcm_->DeRegisterCaptureDataCallback(); |
| vcm_->Release(); |
| - // TODO(pbos): How do I destroy the VideoCaptureModule? This still leaves |
| - // non-freed memory. |
| vcm_ = NULL; |
| } |