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