ref: 6b4ac9b2534a78fcd220ba89ef1da5e0eef30837
parent: ed217fe372f59eaeef074b4d3859b49a700cfa47
author: Marco Paniconi <[email protected]>
date: Mon May 28 15:32:01 EDT 2018
vp9-svc: Fix to allowed value of max_consec_drop. For the max_consec_drop parameter in svc frame drop: since passing value 0 in the control would completely disable the dropper, only allow for values >= 1 to be set. Change-Id: I6b74ec9cc08a638fa571d6246a021dab9c811d14
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -1538,7 +1538,8 @@
cpi->svc.framedrop_mode = data->framedrop_mode;
for (sl = 0; sl < cpi->svc.number_spatial_layers; ++sl)
cpi->svc.framedrop_thresh[sl] = data->framedrop_thresh[sl];
- cpi->svc.max_consec_drop = data->max_consec_drop;
+ // Don't allow max_consec_drop values below 1.
+ cpi->svc.max_consec_drop = VPXMAX(1, data->max_consec_drop);
return VPX_CODEC_OK;
}