From c914c99d4b8159d6be7c53c21f63d84f24d5ffeb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 8 Sep 2013 14:57:07 +0200 Subject: [PATCH] swscale/utils: use memcpy instead of loop in sws_cloneVec() Signed-off-by: Michael Niedermayer --- libswscale/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 53687f46c2..497d369c81 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1899,14 +1899,12 @@ void sws_convVec(SwsVector *a, SwsVector *b) SwsVector *sws_cloneVec(SwsVector *a) { - int i; SwsVector *vec = sws_allocVec(a->length); if (!vec) return NULL; - for (i = 0; i < a->length; i++) - vec->coeff[i] = a->coeff[i]; + memcpy(vec->coeff, a->coeff, a->length * sizeof(*a->coeff)); return vec; }