[FFmpeg-cvslog] qtrle: use memcpy()

Paul B Mahol git at videolan.org
Wed Aug 21 21:34:27 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 21 19:13:03 2013 +0000| [5c9d44d66bd47816926d9c6e6ac55b72f52e087e] | committer: Paul B Mahol

qtrle: use memcpy()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

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

diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index a596cb5..da411f6 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 */



More information about the ffmpeg-cvslog mailing list