  By using optimal mass transportation and a quantitative H\"older inequality,
we provide estimates for the Borell-Brascamp-Lieb deficit on complete
Riemannian manifolds. Accordingly, equality cases in Borell-Brascamp-Lieb
inequalities (including Brunn-Minkowski and Pr\'ekopa-Leindler inequalities)
are characterized in terms of the optimal transport map between suitable
marginal probability measures. These results provide several qualitative
applications both in the flat and non-flat frameworks. In particular, by using
Caffarelli's regularity result for the Monge-Amp\`ere equation, we {give a new
proof} of Dubuc's characterization of the equality in Borell-Brascamp-Lieb
inequalities in the Euclidean setting. When the $n$-dimensional Riemannian
manifold has Ricci curvature ${\rm Ric}(M)\geq (n-1)k$ for some $k\in \mathbb
R$, it turns out that equality in the Borell-Brascamp-Lieb inequality is
expected only when a particular region of the manifold between the marginal
supports has constant sectional curvature $k$. A precise characterization is
provided for the equality in the Lott-Sturm-Villani-type distorted
Brunn-Minkowski inequality on Riemannian manifolds. Related results for (not
necessarily reversible) Finsler manifolds are also presented.
