git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35e16b1
)
avutil/pca: Use av_malloc_array()
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 4 May 2014 17:00:16 +0000
(19:00 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 4 May 2014 17:00:16 +0000
(19:00 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/pca.c
patch
|
blob
|
history
diff --git
a/libavutil/pca.c
b/libavutil/pca.c
index
311b6bc
..
26d5bbb
100644
(file)
--- a/
libavutil/pca.c
+++ b/
libavutil/pca.c
@@
-42,7
+42,7
@@
PCA *ff_pca_init(int n){
pca= av_mallocz(sizeof(*pca));
pca->n= n;
- pca->z = av_malloc
(sizeof(*pca->z) * n
);
+ pca->z = av_malloc
_array(n, sizeof(*pca->z)
);
pca->count=0;
pca->covariance= av_calloc(n*n, sizeof(double));
pca->mean= av_calloc(n, sizeof(double));