Fixes wrong number of segments output and undefined memory access. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 58e0402e02) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
58e0402e02