]> granicus.if.org Git - libvpx/commitdiff
vp9_svc_layercontext.c: fix integer sanitizer warnings
authorHien Ho <hienho@google.com>
Tue, 30 Jul 2019 18:28:03 +0000 (11:28 -0700)
committerHien Ho <hienho@google.com>
Tue, 30 Jul 2019 18:34:11 +0000 (18:34 +0000)
implicit conversion from type 'int' of value -1
(32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the
value to 255 (8-bit, unsigned

BUG=webm:1615

Change-Id: If507e73aea4dccd3914b6470f8d15db3b67300ce

vp9/encoder/vp9_svc_layercontext.c

index 8ba113bf3e76fbe89ea79d7a908d95bc0ef8d23d..bfe803b24dac2b8302698fb50f91ac6e8529960b 100644 (file)
@@ -57,8 +57,8 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
   svc->simulcast_mode = 0;
 
   for (i = 0; i < REF_FRAMES; ++i) {
-    svc->fb_idx_spatial_layer_id[i] = -1;
-    svc->fb_idx_temporal_layer_id[i] = -1;
+    svc->fb_idx_spatial_layer_id[i] = 0xff;
+    svc->fb_idx_temporal_layer_id[i] = 0xff;
     svc->fb_idx_base[i] = 0;
   }
   for (sl = 0; sl < oxcf->ss_number_layers; ++sl) {