]> git.sesse.net Git - ffmpeg/commitdiff
pca: use av_calloc()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 15 Apr 2013 18:27:06 +0000 (20:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 15 Apr 2013 18:31:06 +0000 (20:31 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/pca.c

index c2a9e296b7dee079956b60024e7598b759811d96..311b6bc9cb4feed67071cd797fbefb0e755c84ca 100644 (file)
@@ -44,8 +44,8 @@ PCA *ff_pca_init(int n){
     pca->n= n;
     pca->z = av_malloc(sizeof(*pca->z) * n);
     pca->count=0;
-    pca->covariance= av_mallocz(sizeof(double)*n*n);
-    pca->mean= av_mallocz(sizeof(double)*n);
+    pca->covariance= av_calloc(n*n, sizeof(double));
+    pca->mean= av_calloc(n, sizeof(double));
 
     return pca;
 }