Make RtpEncodingParameters to not reverse active flags order

Bug: webrtc:11319
Change-Id: If63db02d282ee622c12405f85c0fbae1ba13fcb2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168196
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30459}
This commit is contained in:
Ilya Nikolaevskiy
2020-02-05 17:31:00 +01:00
committed by Commit Bot
parent 02b17a5507
commit 72859e5e15
3 changed files with 17 additions and 3 deletions

View File

@ -156,6 +156,9 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
break;
}
case kVideoCodecVP9: {
// Force the first stream to always be active.
video_codec.simulcastStream[0].active = codec_active;
if (!config.encoder_specific_settings) {
*video_codec.VP9() = VideoEncoder::GetDefaultVp9Settings();
}
@ -197,7 +200,7 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
spatial_idx < config.simulcast_layers.size() &&
spatial_idx < spatial_layers.size();
++spatial_idx) {
spatial_layers[spatial_layers.size() - spatial_idx - 1].active =
spatial_layers[spatial_idx].active =
config.simulcast_layers[spatial_idx].active;
}
}