Commit f3e5a784 authored by Justin Ruggles's avatar Justin Ruggles
Browse files

alac: calculate buffer size outside the loop in allocate_buffers()

parent bae83f2c
......@@ -505,9 +505,9 @@ static av_cold int alac_decode_close(AVCodecContext *avctx)
static int allocate_buffers(ALACContext *alac)
{
int ch;
for (ch = 0; ch < FFMIN(alac->channels, 2); ch++) {
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < FFMIN(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch],
buf_size, buf_alloc_fail);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment