/* don't care for anything except opus eos */
if (op->e_o_s && ctx->os.serialno == ctx->opus_serialno)
ctx->eos = true;
- output = alloc(sizeof(short) * MAX_FRAME_SIZE * ctx->channels);
+ output = arr_alloc(sizeof(short) * ctx->channels, MAX_FRAME_SIZE);
ret = opus_multistream_decode(ctx->st, (unsigned char *)op->packet,
op->bytes, output, MAX_FRAME_SIZE, 0);
if (ret < 0) {