diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-12 23:14:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-12 23:36:00 +0100 |
commit | 13871a95d0e4af15b771040254079da908a34d6b (patch) | |
tree | e15bcd6ba1e42b70892945917bc4b5d9641c87a3 /libavcodec/snow.c | |
parent | 24222cc1d5caaeaad8df69904bc546bf9d34caa3 (diff) | |
download | ffmpeg-13871a95d0e4af15b771040254079da908a34d6b.tar.gz |
avcodec/snow: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r-- | libavcodec/snow.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 83db3c7195..d5a620ba68 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -594,9 +594,9 @@ static int halfpel_interpol(SnowContext *s, uint8_t *halfpel[4][4], AVFrame *fra int ls= frame->linesize[p]; uint8_t *src= frame->data[p]; - halfpel[1][p] = (uint8_t*) av_malloc(ls * (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); - halfpel[2][p] = (uint8_t*) av_malloc(ls * (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); - halfpel[3][p] = (uint8_t*) av_malloc(ls * (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); + halfpel[1][p] = (uint8_t*) av_malloc_array(ls, (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); + halfpel[2][p] = (uint8_t*) av_malloc_array(ls, (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); + halfpel[3][p] = (uint8_t*) av_malloc_array(ls, (h + 2 * EDGE_WIDTH)) + EDGE_WIDTH * (1 + ls); if (!halfpel[1][p] || !halfpel[2][p] || !halfpel[3][p]) return AVERROR(ENOMEM); |