We introduce in this paper a new approach based on an integral formulation in order to get a relevant approximation of the mean flow patterns in one-dimensional ducts with variable cross-sections. Numerical results are compared with those obtained by using the standard one-dimensional formulation associated with a well-balanced scheme, and also with numerical results provided by a multi-dimensional code. The comparison includes ducts with smooth or discontinuous cross sections. This new formulation is shown to be robust wrt to sudden and high cross-section variations, even when a total obstruction occurs, and to be accurate when compared with the reference solution