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