]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix to key frame counter for spatial layers.
authorMarco <marpan@google.com>
Wed, 18 Nov 2015 22:29:25 +0000 (14:29 -0800)
committerMarco <marpan@google.com>
Wed, 18 Nov 2015 22:31:37 +0000 (14:31 -0800)
Existing condition only applied to temporal layers.

Change-Id: Icef20a59d0afc61d4e14dea01aff4786fa9e41ae

vp9/encoder/vp9_svc_layercontext.c

index 1dfc45cf608a151e9bc1f030cbcf2f48e4f60358..13da155c71acc40689ac3aa957e008d02ca83d25 100644 (file)
@@ -278,7 +278,8 @@ void vp9_restore_layer_context(VP9_COMP *const cpi) {
   cpi->alt_ref_source = lc->alt_ref_source;
   // Reset the frames_since_key and frames_to_key counters to their values
   // before the layer restore. Keep these defined for the stream (not layer).
-  if (cpi->svc.number_temporal_layers > 1) {
+  if (cpi->svc.number_temporal_layers > 1 ||
+      cpi->svc.number_spatial_layers > 1) {
     cpi->rc.frames_since_key = old_frame_since_key;
     cpi->rc.frames_to_key = old_frame_to_key;
   }