aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-18 15:22:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-18 15:22:29 +0200
commit71f8cdcc1648f12adc3decdd89c053a0e0fac231 (patch)
treea893a598739594f9e4919a4cc8ed23767e0911f6
parentbb0d9aedcbda268764cf7c41b07e24b3a05356f0 (diff)
downloadffmpeg-71f8cdcc1648f12adc3decdd89c053a0e0fac231.tar.gz
avcodec/snow: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/snow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index c645b120fb..5546a2da33 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -88,7 +88,7 @@ int ff_snow_alloc_blocks(SnowContext *s){
s->b_height= h;
av_free(s->block);
- s->block= av_mallocz(w * h * sizeof(BlockNode) << (s->block_max_depth*2));
+ s->block= av_mallocz_array(w * h, sizeof(BlockNode) << (s->block_max_depth*2));
if (!s->block)
return AVERROR(ENOMEM);
@@ -537,7 +537,7 @@ int ff_snow_common_init_after_header(AVCodecContext *avctx) {
b->parent= &s->plane[plane_index].band[level-1][orientation];
//FIXME avoid this realloc
av_freep(&b->x_coeff);
- b->x_coeff=av_mallocz(((b->width+1) * b->height+1)*sizeof(x_and_coeff));
+ b->x_coeff=av_mallocz_array(((b->width+1) * b->height+1), sizeof(x_and_coeff));
if (!b->x_coeff)
goto fail;
}