summaryrefslogtreecommitdiff
path: root/libavcodec/error_resilience.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-12 15:33:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-12 15:33:55 +0200
commit36053aeff651ccf11b9a15dcbe61aaa1317135ac (patch)
treeb0f3718820753160dc80224991e1b7f75620b9be /libavcodec/error_resilience.c
parentfb4ac46d7f51cee2244e909de1c2432bdb95c08b (diff)
vcodec/error_resilience: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r--libavcodec/error_resilience.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 5410dc1cea..670e592b8c 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -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");