fate/cabac: replace uninitialized bytes by random bytes
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 23 Jan 2016 19:30:02 +0000 (20:30 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 23 Jan 2016 19:53:29 +0000 (20:53 +0100)
Fixes valgrind warning

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cabac.c

index f2c239d..a9fafbd 100644 (file)
@@ -318,7 +318,9 @@ int main(void){
         put_cabac(&c, state, r[i]&1);
     }
 
-    put_cabac_terminate(&c, 1);
+    i= put_cabac_terminate(&c, 1);
+    b[i++] = av_lfg_get(&prng);
+    b[i  ] = av_lfg_get(&prng);
 
     ff_init_cabac_decoder(&c, b, SIZE);