Fix frame size calculation, was causing distorded video on some cores