Improve getRemainSize for MediaEngine.

It's more accurate now.