[FFmpeg-cvslog] avfilter/vsrc_mandelbrot: use av_malloc_array()
Michael Niedermayer
git at videolan.org
Thu May 15 02:51:43 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu May 15 01:54:36 2014 +0200| [3af7e7b501d960d6dc07ebfebffc766ebd73fb1a] | committer: Michael Niedermayer
avfilter/vsrc_mandelbrot: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3af7e7b501d960d6dc07ebfebffc766ebd73fb1a
---
libavfilter/vsrc_mandelbrot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index 19dddf9..255f2db 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -130,9 +130,9 @@ static av_cold int init(AVFilterContext *ctx)
mb->cache_allocated = mb->w * mb->h * 3;
mb->cache_used = 0;
- mb->point_cache= av_malloc(sizeof(*mb->point_cache)*mb->cache_allocated);
- mb-> next_cache= av_malloc(sizeof(*mb-> next_cache)*mb->cache_allocated);
- mb-> zyklus = av_malloc(sizeof(*mb->zyklus) * (mb->maxiter+16));
+ mb->point_cache= av_malloc_array(mb->cache_allocated, sizeof(*mb->point_cache));
+ mb-> next_cache= av_malloc_array(mb->cache_allocated, sizeof(*mb-> next_cache));
+ mb-> zyklus = av_malloc_array(mb->maxiter + 16, sizeof(*mb->zyklus));
return 0;
}
More information about the ffmpeg-cvslog
mailing list