[FFmpeg-cvslog] avcodec/wmalosslessdec: use sizeof() instead of a literal number

Michael Niedermayer git at videolan.org
Thu Feb 19 03:49:57 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Feb 19 03:14:50 2015 +0100| [f144e4ddff11a1f355d2f9381cad04c66dbf55d1] | committer: Michael Niedermayer

avcodec/wmalosslessdec: use sizeof() instead of a literal number

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/wmalosslessdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index c9bcc26..fcadbc0 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -700,9 +700,9 @@ static void lms_update(WmallDecodeCtx *s, int ich, int ilms, int input)
         recent--;
     else {
         memcpy(s->cdlms[ich][ilms].lms_prevvalues + order,
-               s->cdlms[ich][ilms].lms_prevvalues, 2 * order);
+               s->cdlms[ich][ilms].lms_prevvalues, sizeof(*s->cdlms[ich][ilms].lms_prevvalues) * order);
         memcpy(s->cdlms[ich][ilms].lms_updates + order,
-               s->cdlms[ich][ilms].lms_updates, 2 * order);
+               s->cdlms[ich][ilms].lms_updates, sizeof(*s->cdlms[ich][ilms].lms_updates) * order);
         recent = order - 1;
     }
 



More information about the ffmpeg-cvslog mailing list