diff --git a/libavutil/pca.c b/libavutil/pca.c index c2a9e296b7..311b6bc9cb 100644 --- a/libavutil/pca.c +++ b/libavutil/pca.c @@ -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; }