[FFmpeg-cvslog] fate/cabac: replace uninitialized bytes by random bytes

Michael Niedermayer git at videolan.org
Sat Jan 23 21:13:49 CET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Jan 23 20:30:02 2016 +0100| [0be4377333d8a9104eadd8b297605a6e95b22047] | committer: Michael Niedermayer

fate/cabac: replace uninitialized bytes by random bytes

Fixes valgrind warning

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0be4377333d8a9104eadd8b297605a6e95b22047
---

 libavcodec/cabac.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index f2c239d..a9fafbd 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);
 



More information about the ffmpeg-cvslog mailing list