Index: webrtc/modules/video_coding/main/source/generic_encoder.cc |
diff --git a/webrtc/modules/video_coding/main/source/generic_encoder.cc b/webrtc/modules/video_coding/main/source/generic_encoder.cc |
index c0925b95b2fb493018731e564b8aa2cad1f110ba..e4408d1f7e7401f80da155124ff41351c7f7a2ee 100644 |
--- a/webrtc/modules/video_coding/main/source/generic_encoder.cc |
+++ b/webrtc/modules/video_coding/main/source/generic_encoder.cc |
@@ -55,9 +55,11 @@ void CopyCodecSpecific(const CodecSpecificInfo* info, RTPVideoHeader* rtp) { |
info->codecSpecific.VP9.inter_layer_predicted; |
rtp->codecHeader.VP9.gof_idx = info->codecSpecific.VP9.gof_idx; |
+ // Packetizer needs to know the number of spatial layers to correctly set |
+ // the marker bit, even when the number won't be written in the packet. |
+ rtp->codecHeader.VP9.num_spatial_layers = |
+ info->codecSpecific.VP9.num_spatial_layers; |
if (info->codecSpecific.VP9.ss_data_available) { |
- rtp->codecHeader.VP9.num_spatial_layers = |
- info->codecSpecific.VP9.num_spatial_layers; |
rtp->codecHeader.VP9.spatial_layer_resolution_present = |
info->codecSpecific.VP9.spatial_layer_resolution_present; |
if (info->codecSpecific.VP9.spatial_layer_resolution_present) { |