mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 07:31:22 +01:00
avfilter/vf_uspp: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e01467241f
commit
341bd6ec6a
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue