Commit 2c3a3481 authored by Ilya Nikolaevskiy's avatar Ilya Nikolaevskiy Committed by Commit Bot

Fix possible crash in MediaStreamVideoWebrtcSink

Bug: chromium:1147778
Change-Id: I2fc4d173406022d6fb85bdee8416dedad72c7c50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531997
Commit-Queue: Ilya Nikolaevskiy <ilnik@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Auto-Submit: Ilya Nikolaevskiy <ilnik@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826229}
parent 840d62d0
...@@ -169,12 +169,14 @@ MediaStreamVideoWebRtcSink::MediaStreamVideoWebRtcSink( ...@@ -169,12 +169,14 @@ MediaStreamVideoWebRtcSink::MediaStreamVideoWebRtcSink(
bool is_screencast = video_track->is_screencast(); bool is_screencast = video_track->is_screencast();
MediaStreamVideoSource* source = video_track->source();
VideoCaptureFeedbackCB feedback_cb =
source ? source->GetFeedbackCallback() : base::DoNothing();
// TODO(pbos): Consolidate WebRtcVideoCapturerAdapter into WebRtcVideoSource // TODO(pbos): Consolidate WebRtcVideoCapturerAdapter into WebRtcVideoSource
// by removing the need for and dependency on a cricket::VideoCapturer. // by removing the need for and dependency on a cricket::VideoCapturer.
video_source_ = scoped_refptr<WebRtcVideoTrackSource>( video_source_ = scoped_refptr<WebRtcVideoTrackSource>(
new rtc::RefCountedObject<WebRtcVideoTrackSource>( new rtc::RefCountedObject<WebRtcVideoTrackSource>(
is_screencast, needs_denoising, is_screencast, needs_denoising, feedback_cb));
video_track->source()->GetFeedbackCallback()));
// TODO(pbos): Consolidate the local video track with the source proxy and // TODO(pbos): Consolidate the local video track with the source proxy and
// move into PeerConnectionDependencyFactory. This now separately holds on a // move into PeerConnectionDependencyFactory. This now separately holds on a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment