Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 64b6164b721c77cbb28b381af31bd8ea753818c5)