[FFmpeg-cvslog] avcodec/wmalosslessdec: Fix memset sizeof

Michael Niedermayer git at videolan.org
Sun May 1 18:45:25 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun May  1 18:29:02 2016 +0200| [3187277ebb7f41621def2781e749ba709a509ef4] | committer: Michael Niedermayer

avcodec/wmalosslessdec: Fix memset sizeof

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

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

 libavcodec/wmalosslessdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index f14e8a6..3e80c47 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -717,7 +717,7 @@ static void lms_update(WmallDecodeCtx *s, int ich, int ilms, int input)
     s->cdlms[ich][ilms].lms_updates[recent + (order >> 3)] >>= 1;
     s->cdlms[ich][ilms].recent = recent;
     memset(s->cdlms[ich][ilms].lms_updates + recent + order, 0,
-           sizeof(s->cdlms[ich][ilms].lms_updates) - 4*(recent+order));
+           sizeof(s->cdlms[ich][ilms].lms_updates) - sizeof(int16_t)*(recent+order));
 }
 
 static void use_high_update_speed(WmallDecodeCtx *s, int ich)



More information about the ffmpeg-cvslog mailing list