mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
vcodec/error_resilience: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
fb4ac46d7f
commit
36053aeff6
@ -136,8 +136,8 @@ static void guess_dc(ERContext *s, int16_t *dc, int w,
|
||||
int h, int stride, int is_luma)
|
||||
{
|
||||
int b_x, b_y;
|
||||
int16_t (*col )[4] = av_malloc(stride*h*sizeof( int16_t)*4);
|
||||
uint32_t (*dist)[4] = av_malloc(stride*h*sizeof(uint32_t)*4);
|
||||
int16_t (*col )[4] = av_malloc_array(stride, h*sizeof( int16_t)*4);
|
||||
uint32_t (*dist)[4] = av_malloc_array(stride, h*sizeof(uint32_t)*4);
|
||||
|
||||
if(!col || !dist) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "guess_dc() is out of memory\n");
|
||||
|
Loading…
Reference in New Issue
Block a user