From 0be4377333d8a9104eadd8b297605a6e95b22047 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 23 Jan 2016 20:30:02 +0100 Subject: fate/cabac: replace uninitialized bytes by random bytes Fixes valgrind warning Signed-off-by: Michael Niedermayer --- libavcodec/cabac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index f2c239da89..a9fafbdd33 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -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); -- cgit v1.2.1