[VP9 encoder] Set temporal id also on disabled spatial layers

Bug: chromium:1051476
Change-Id: Iaf2b6ab6640cd314a620dbdf1547d8f1b2f40693
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168921
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30581}
This commit is contained in:
Ilya Nikolaevskiy
2020-02-21 12:05:28 +01:00
committed by Commit Bot
parent 694b74b826
commit 1dea1ea412

View File

@ -917,7 +917,10 @@ int VP9EncoderImpl::Encode(const VideoFrame& input_image,
} }
} }
for (int sl_idx = 0; sl_idx < num_active_spatial_layers_; ++sl_idx) { // Need to set temporal layer id on ALL layers, even disabled ones.
// Otherwise libvpx might produce frames on a disabled layer:
// http://crbug.com/1051476
for (int sl_idx = 0; sl_idx < num_spatial_layers_; ++sl_idx) {
layer_id.temporal_layer_id_per_spatial[sl_idx] = layer_id.temporal_layer_id; layer_id.temporal_layer_id_per_spatial[sl_idx] = layer_id.temporal_layer_id;
} }