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