libstagefright: Check for duration > 0 to avoid DivideByZero crash
From cm-10.1