Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 76edf2c1377fdb35609f79a6702081de4d93e331)