swscale/utils: use memcpy instead of loop in sws_cloneVec()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/35/head
Michael Niedermayer 12 years ago
parent 14851ca5f5
commit c914c99d4b
  1. 4
      libswscale/utils.c

@ -1899,14 +1899,12 @@ void sws_convVec(SwsVector *a, SwsVector *b)
SwsVector *sws_cloneVec(SwsVector *a) SwsVector *sws_cloneVec(SwsVector *a)
{ {
int i;
SwsVector *vec = sws_allocVec(a->length); SwsVector *vec = sws_allocVec(a->length);
if (!vec) if (!vec)
return NULL; return NULL;
for (i = 0; i < a->length; i++) memcpy(vec->coeff, a->coeff, a->length * sizeof(*a->coeff));
vec->coeff[i] = a->coeff[i];
return vec; return vec;
} }

Loading…
Cancel
Save