From 8a11114a790833f83e9e5aa3e7726aa96297df78 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 15 Apr 2013 20:27:06 +0200 Subject: [PATCH] pca: use av_calloc() Signed-off-by: Michael Niedermayer --- libavutil/pca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }