aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-01-25 11:51:16 +0000
committerPaul B Mahol <onemda@gmail.com>2013-01-25 12:54:14 +0000
commitf1412c799732e0a9bcba191f8eb23e3d14b7cece (patch)
treecaf9fb4cabc82f3a0daac651c36592d1f98700fb
parent91ae9bc51e0f61c1c1caa2e26caf6e2add906f38 (diff)
downloadffmpeg-f1412c799732e0a9bcba191f8eb23e3d14b7cece.tar.gz
lavc/gifdec: use memcpy()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavcodec/gifdec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index d52f2d5348..b10a1a5474 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -116,7 +116,7 @@ static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst,
int linesize, int l, int t, int w, int h)
{
const int y_start = t * linesize;
- const uint32_t *src_px, *src_pr,
+ const uint32_t *src_px,
*src_py = src + y_start,
*dst_py = dst + y_start;
const uint32_t *src_pb = src_py + h * linesize;
@@ -125,10 +125,8 @@ static void gif_copy_img_rect(const uint32_t *src, uint32_t *dst,
for (; src_py < src_pb; src_py += linesize, dst_py += linesize) {
src_px = src_py + l;
dst_px = (uint32_t *)dst_py + l;
- src_pr = src_px + w;
- for (; src_px < src_pr; src_px++, dst_px++)
- *dst_px = *src_px;
+ memcpy(dst_px, src_px, w * sizeof(uint32_t));
}
}