From 5c9d44d66bd47816926d9c6e6ac55b72f52e087e Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 21 Aug 2013 19:13:03 +0000 Subject: [PATCH] qtrle: use memcpy() Signed-off-by: Paul B Mahol --- libavcodec/qtrle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index a596cb5f44..da411f691d 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -147,8 +147,8 @@ static inline void qtrle_decode_2n4bpp(QtrleContext *s, int row_ptr, } CHECK_PIXEL_PTR(rle_code * num_pixels); while (rle_code--) { - for (i = 0; i < num_pixels; i++) - rgb[pixel_ptr++] = pi[i]; + memcpy(&rgb[pixel_ptr], &pi, num_pixels); + pixel_ptr += num_pixels; } } else { /* copy the same pixel directly to output 4 times */