diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-19 19:42:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-19 19:42:46 +0200 |
commit | d9ddbaa9245c3cac92d99f7e8ff762518e8ef39e (patch) | |
tree | 1e100b644c110518e9663d32b0c4f515f0555998 /libavfilter/avfilter.c | |
parent | d13a731fc149d3fdbe679078479ec1950674e762 (diff) | |
download | ffmpeg-streaming-d9ddbaa9245c3cac92d99f7e8ff762518e8ef39e.zip ffmpeg-streaming-d9ddbaa9245c3cac92d99f7e8ff762518e8ef39e.tar.gz |
avfilter/avfilter: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 7e166e0..7b11467 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -627,22 +627,22 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) ret->nb_inputs = avfilter_pad_count(filter->inputs); if (ret->nb_inputs ) { - ret->input_pads = av_malloc(sizeof(AVFilterPad) * ret->nb_inputs); + ret->input_pads = av_malloc_array(ret->nb_inputs, sizeof(AVFilterPad)); if (!ret->input_pads) goto err; memcpy(ret->input_pads, filter->inputs, sizeof(AVFilterPad) * ret->nb_inputs); - ret->inputs = av_mallocz(sizeof(AVFilterLink*) * ret->nb_inputs); + ret->inputs = av_mallocz_array(ret->nb_inputs, sizeof(AVFilterLink*)); if (!ret->inputs) goto err; } ret->nb_outputs = avfilter_pad_count(filter->outputs); if (ret->nb_outputs) { - ret->output_pads = av_malloc(sizeof(AVFilterPad) * ret->nb_outputs); + ret->output_pads = av_malloc_array(ret->nb_outputs, sizeof(AVFilterPad)); if (!ret->output_pads) goto err; memcpy(ret->output_pads, filter->outputs, sizeof(AVFilterPad) * ret->nb_outputs); - ret->outputs = av_mallocz(sizeof(AVFilterLink*) * ret->nb_outputs); + ret->outputs = av_mallocz_array(ret->nb_outputs, sizeof(AVFilterLink*)); if (!ret->outputs) goto err; } |