libavfilter/af_atempo: Avoid round-off error build-up, ticket #2484
authorPavel Koshevoy <pkoshevoy@gmail.com>
Sun, 21 Apr 2013 03:34:25 +0000 (21:34 -0600)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Apr 2013 08:46:52 +0000 (10:46 +0200)
commit0c77cdb491de7a178e4142cb6a24538eec6b4f64
treefe8b18ad10d3bc0ef6fabea23cf906115ed00b0d
parent5a2a0603780a6a5bb6d254e60eeb525378955b59
libavfilter/af_atempo: Avoid round-off error build-up, ticket #2484

Current method for constraining fragment position drift suffers from
round-off error build up.

Instead of calculating cumulative drift as a sum of input fragment
position corrections, it is more accurate to calculate drift as the
difference between current fragment position and the ideal position
specified by the tempo scale factor.

Signed-off-by: Pavel Koshevoy <pkoshevoy@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/af_atempo.c