You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
alac: calculate buffer size outside the loop in allocate_buffers()
This commit is contained in:
@@ -505,9 +505,9 @@ static av_cold int alac_decode_close(AVCodecContext *avctx)
|
|||||||
static int allocate_buffers(ALACContext *alac)
|
static int allocate_buffers(ALACContext *alac)
|
||||||
{
|
{
|
||||||
int ch;
|
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],
|
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch],
|
||||||
buf_size, buf_alloc_fail);
|
buf_size, buf_alloc_fail);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user