Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Code adapted from James Darnley's port Some fixes from Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>