Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-10 22:44:19 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-09-10 22:44:19 +0400
commit6f48c60956aa2fddd85f23dbdd0ce9d51da03094 (patch)
tree741b92e767bdeed0c12f249d31187988ca4803ed /libavcodec/twinvq.c
parentc4a0c64f1450cb494c247ebcef248c20e76c19f8 (diff)
avcodec/twinvq: Use FF_ALLOC_ARRAY_OR_GOTO()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/twinvq.c')
-rw-r--r--libavcodec/twinvq.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 08a7a9f4e8..f11722026c 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -546,24 +546,24 @@ static av_cold int init_mdct_win(TwinVQContext *tctx)
return ret;
}
- FF_ALLOC_OR_GOTO(tctx->avctx, tctx->tmp_buf,
- mtab->size * sizeof(*tctx->tmp_buf), alloc_fail);
+ FF_ALLOC_ARRAY_OR_GOTO(tctx->avctx, tctx->tmp_buf,
+ mtab->size, sizeof(*tctx->tmp_buf), alloc_fail);
- FF_ALLOC_OR_GOTO(tctx->avctx, tctx->spectrum,
- 2 * mtab->size * channels * sizeof(*tctx->spectrum),
+ FF_ALLOC_ARRAY_OR_GOTO(tctx->avctx, tctx->spectrum,
+ 2 * mtab->size, channels * sizeof(*tctx->spectrum),
alloc_fail);
- FF_ALLOC_OR_GOTO(tctx->avctx, tctx->curr_frame,
- 2 * mtab->size * channels * sizeof(*tctx->curr_frame),
+ FF_ALLOC_ARRAY_OR_GOTO(tctx->avctx, tctx->curr_frame,
+ 2 * mtab->size, channels * sizeof(*tctx->curr_frame),
alloc_fail);
- FF_ALLOC_OR_GOTO(tctx->avctx, tctx->prev_frame,
- 2 * mtab->size * channels * sizeof(*tctx->prev_frame),
+ FF_ALLOC_ARRAY_OR_GOTO(tctx->avctx, tctx->prev_frame,
+ 2 * mtab->size, channels * sizeof(*tctx->prev_frame),
alloc_fail);
for (i = 0; i < 3; i++) {
int m = 4 * mtab->size / mtab->fmode[i].sub;
double freq = 2 * M_PI / m;
- FF_ALLOC_OR_GOTO(tctx->avctx, tctx->cos_tabs[i],
- (m / 4) * sizeof(*tctx->cos_tabs[i]), alloc_fail);
+ FF_ALLOC_ARRAY_OR_GOTO(tctx->avctx, tctx->cos_tabs[i],
+ (m / 4), sizeof(*tctx->cos_tabs[i]), alloc_fail);
for (j = 0; j <= m / 8; j++)
tctx->cos_tabs[i][j] = cos((2 * j + 1) * freq);