]> granicus.if.org Git - libvpx/commitdiff
Fix a spatial svc assert failure
authorDebargha Mukherjee <debargha@google.com>
Tue, 1 Dec 2015 21:20:02 +0000 (13:20 -0800)
committerDebargha Mukherjee <debargha@google.com>
Tue, 1 Dec 2015 22:24:50 +0000 (14:24 -0800)
Fixes spatial svc rc assert failure introdcued in:
https://chromium-review.googlesource.com/#/c/312959/1

Change-Id: I6096bfbc484859d71a5fb55e6a3248a31885af61

vp9/encoder/vp9_svc_layercontext.c

index 13da155c71acc40689ac3aa957e008d02ca83d25..b0617c1cacd66d231193ec367d2974e2f76a3d46 100644 (file)
@@ -279,7 +279,7 @@ void vp9_restore_layer_context(VP9_COMP *const cpi) {
   // 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 ||
-      cpi->svc.number_spatial_layers > 1) {
+      (cpi->svc.number_spatial_layers > 1 && !is_two_pass_svc(cpi))) {
     cpi->rc.frames_since_key = old_frame_since_key;
     cpi->rc.frames_to_key = old_frame_to_key;
   }