Based on patch by Janne Grunau. Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Mans Rullgard <mans@mansr.com>