Chromium Code Reviews| Index: content/renderer/media/media_stream_video_track.cc |
| diff --git a/content/renderer/media/media_stream_video_track.cc b/content/renderer/media/media_stream_video_track.cc |
| index 143b0c72fd41a2dcd8ca8b98200cc857e2a3cbd8..d5d966d96c02e3e9a3d2eeb586a84e3730a2a307 100644 |
| --- a/content/renderer/media/media_stream_video_track.cc |
| +++ b/content/renderer/media/media_stream_video_track.cc |
| @@ -390,16 +390,21 @@ void MediaStreamVideoTrack::Stop() { |
| void MediaStreamVideoTrack::GetSettings( |
| blink::WebMediaStreamTrack::Settings& settings) { |
| + DCHECK(main_render_thread_checker_.CalledOnValidThread()); |
| + if (width_ && height_) { |
| + settings.width = width_; |
| + settings.height = height_; |
| + } |
|
mcasas
2017/04/11 17:37:00
nit: maybe nonsense, but what about
if (width_)
Guido Urdaneta
2017/04/11 18:40:42
I think the original intent is to return values on
|
| + |
| + if (!source_) |
| + return; |
| + |
| base::Optional<media::VideoCaptureFormat> format = |
| source_->GetCurrentFormat(); |
| if (format) { |
| settings.frame_rate = format->frame_rate; |
| settings.video_kind = GetVideoKindForFormat(*format); |
| } |
| - if (width_ && height_) { |
| - settings.width = width_; |
| - settings.height = height_; |
| - } |
| switch (source_->device_info().device.video_facing) { |
| case media::MEDIA_VIDEO_FACING_NONE: |
| settings.facing_mode = blink::WebMediaStreamTrack::FacingMode::kNone; |