mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_fieldmatch: use av_malloc_array()
This commit is contained in:
parent
b43c35c633
commit
27f1ee7f53
|
@ -951,8 +951,8 @@ static int config_input(AVFilterLink *inlink)
|
|||
fm->tpitchuv = FFALIGN(w >> 1, 16);
|
||||
|
||||
fm->tbuffer = av_calloc((h/2 + 4) * fm->tpitchy, sizeof(*fm->tbuffer));
|
||||
fm->c_array = av_malloc((((w + fm->blockx/2)/fm->blockx)+1) *
|
||||
(((h + fm->blocky/2)/fm->blocky)+1) *
|
||||
fm->c_array = av_malloc_array((((w + fm->blockx/2)/fm->blockx)+1) *
|
||||
(((h + fm->blocky/2)/fm->blocky)+1),
|
||||
4 * sizeof(*fm->c_array));
|
||||
if (!fm->tbuffer || !fm->c_array)
|
||||
return AVERROR(ENOMEM);
|
||||
|
|
Loading…
Reference in New Issue