1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_fieldmatch: use av_malloc_array()

This commit is contained in:
Paul B Mahol 2021-01-21 12:28:13 +01:00
parent b43c35c633
commit 27f1ee7f53

View File

@ -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);