Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer authored on 2015/01/13 07:27:18... | ... |
@@ -136,12 +136,12 @@ static int allocate_buffers(ShortenContext *s) |
136 | 136 |
return AVERROR_INVALIDDATA; |
137 | 137 |
} |
138 | 138 |
|
139 |
- if ((err = av_reallocp(&s->offset[chan], |
|
140 |
- sizeof(int32_t) * |
|
139 |
+ if ((err = av_reallocp_array(&s->offset[chan], |
|
140 |
+ sizeof(int32_t), |
|
141 | 141 |
FFMAX(1, s->nmean))) < 0) |
142 | 142 |
return err; |
143 | 143 |
|
144 |
- if ((err = av_reallocp(&s->decoded_base[chan], (s->blocksize + s->nwrap) * |
|
144 |
+ if ((err = av_reallocp_array(&s->decoded_base[chan], (s->blocksize + s->nwrap), |
|
145 | 145 |
sizeof(s->decoded_base[0][0]))) < 0) |
146 | 146 |
return err; |
147 | 147 |
for (i = 0; i < s->nwrap; i++) |
... | ... |
@@ -149,7 +149,7 @@ static int allocate_buffers(ShortenContext *s) |
149 | 149 |
s->decoded[chan] = s->decoded_base[chan] + s->nwrap; |
150 | 150 |
} |
151 | 151 |
|
152 |
- if ((err = av_reallocp(&s->coeffs, s->nwrap * sizeof(*s->coeffs))) < 0) |
|
152 |
+ if ((err = av_reallocp_array(&s->coeffs, s->nwrap, sizeof(*s->coeffs))) < 0) |
|
153 | 153 |
return err; |
154 | 154 |
|
155 | 155 |
return 0; |