diff --git a/webrtc/modules/video_processing/frame_preprocessor.cc b/webrtc/modules/video_processing/frame_preprocessor.cc index 6778a597be..d91cacfe39 100644 --- a/webrtc/modules/video_processing/frame_preprocessor.cc +++ b/webrtc/modules/video_processing/frame_preprocessor.cc @@ -95,7 +95,11 @@ uint32_t VPMFramePreprocessor::GetDecimatedHeight() const { } void VPMFramePreprocessor::EnableDenosing(bool enable) { - denoiser_.reset(new VideoDenoiser(true)); + if (enable) { + denoiser_.reset(new VideoDenoiser(true)); + } else { + denoiser_.reset(); + } } const VideoFrame* VPMFramePreprocessor::PreprocessFrame(