diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc index 9e4c2ad76b..7a848cfdff 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc @@ -132,8 +132,19 @@ VideoCodec CreateDecoderVideoCodec(const VideoReceiveStream::Decoder& decoder) { return associated_codec; } - codec.width = 320; - codec.height = 180; + FieldTrialOptional width("w"); + FieldTrialOptional height("h"); + ParseFieldTrial( + {&width, &height}, + field_trial::FindFullName("WebRTC-Video-InitialDecoderResolution")); + if (width && height) { + codec.width = width.Value(); + codec.height = height.Value(); + } else { + codec.width = 320; + codec.height = 180; + } + const int kDefaultStartBitrate = 300; codec.startBitrate = codec.minBitrate = codec.maxBitrate = kDefaultStartBitrate;