Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-09-13 13:25:32 +0400
committerPaul B Mahol <onemda@gmail.com>2013-09-15 23:07:01 +0400
commit693747c3d09fbbc3a9b52402bd5597fec7a375c7 (patch)
tree4a35fde90d7a2945194f7758a834eac3eb2934b9 /libavfilter/vsrc_life.c
parent4f1a17b1a965764b6c3ec61f28ba0572a7e02faa (diff)
avfilter/vsrc_life: use av_calloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vsrc_life.c')
-rw-r--r--libavfilter/vsrc_life.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
index fd82b23b11..26bd38b2a3 100644
--- a/libavfilter/vsrc_life.c
+++ b/libavfilter/vsrc_life.c
@@ -194,8 +194,8 @@ static int init_pattern_from_file(AVFilterContext *ctx)
life->h = h;
}
- if (!(life->buf[0] = av_mallocz(sizeof(char) * life->h * life->w)) ||
- !(life->buf[1] = av_mallocz(sizeof(char) * life->h * life->w))) {
+ if (!(life->buf[0] = av_calloc(life->h * life->w, sizeof(*life->buf[0]))) ||
+ !(life->buf[1] = av_calloc(life->h * life->w, sizeof(*life->buf[1])))) {
av_free(life->buf[0]);
av_free(life->buf[1]);
return AVERROR(ENOMEM);
@@ -236,8 +236,8 @@ static int init(AVFilterContext *ctx)
/* fill the grid randomly */
int i;
- if (!(life->buf[0] = av_mallocz(sizeof(char) * life->h * life->w)) ||
- !(life->buf[1] = av_mallocz(sizeof(char) * life->h * life->w))) {
+ if (!(life->buf[0] = av_calloc(life->h * life->w, sizeof(*life->buf[0]))) ||
+ !(life->buf[1] = av_calloc(life->h * life->w, sizeof(*life->buf[1])))) {
av_free(life->buf[0]);
av_free(life->buf[1]);
return AVERROR(ENOMEM);