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