diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c index 7059c50306..e6895cec44 100644 --- a/libavcodec/ra144.c +++ b/libavcodec/ra144.c @@ -97,14 +97,13 @@ static void eval_coefs(const int *refl, int *coefs) /* rotate block */ static void rotate_block(const int16_t *source, int16_t *target, int offset) { - int i=0, k=0; source += BUFFERSIZE - offset; - while (i BLOCKSIZE) { + memcpy(target, source, BLOCKSIZE*sizeof(*target)); + } else { + memcpy(target, source, offset*sizeof(*target)); + memcpy(target + offset, source, (BLOCKSIZE - offset)*sizeof(*target)); } }