Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 11 years ago
parent
commit
c914c99d4b
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      libswscale/utils.c

+ 1
- 3
libswscale/utils.c View File

@@ -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++)
vec->coeff[i] = a->coeff[i];
memcpy(vec->coeff, a->coeff, a->length * sizeof(*a->coeff));


return vec; return vec;
} }


Loading…
Cancel
Save