Commit 341bd6ec authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_uspp: use av_malloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e0146724
......@@ -335,9 +335,9 @@ static int config_input(AVFilterLink *inlink)
int h = ((height + 4 * BLOCK-1) & (~(2 * BLOCK-1))) >> (is_chroma ? uspp->vsub : 0);
uspp->temp_stride[i] = w;
if (!(uspp->temp[i] = av_malloc(uspp->temp_stride[i] * h * sizeof(int16_t))))
if (!(uspp->temp[i] = av_malloc_array(uspp->temp_stride[i], h * sizeof(int16_t))))
return AVERROR(ENOMEM);
if (!(uspp->src [i] = av_malloc(uspp->temp_stride[i] * h * sizeof(uint8_t))))
if (!(uspp->src [i] = av_malloc_array(uspp->temp_stride[i], h * sizeof(uint8_t))))
return AVERROR(ENOMEM);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment