[FFmpeg-cvslog] avfilter/vf_deshake: Use av_malloc_array()

Michael Niedermayer git at videolan.org
Fri Jul 11 15:44:00 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jul 11 15:30:41 2014 +0200| [be55518fdbdf8579ea91be1fb1db08a5a7028206] | committer: Michael Niedermayer

avfilter/vf_deshake: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be55518fdbdf8579ea91be1fb1db08a5a7028206
---

 libavfilter/vf_deshake.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index c68de36..50aa451 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -249,7 +249,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
     int contrast;
 
     int pos;
-    double *angles = av_malloc(sizeof(*angles) * width * height / (16 * deshake->blocksize));
+    double *angles = av_malloc_array(width * height / (16 * deshake->blocksize), sizeof(*angles));
     int center_x = 0, center_y = 0;
     double p_x, p_y;
 



More information about the ffmpeg-cvslog mailing list