Fix an issue in soft mpeg4 encoder

This issue is also reported on Android Open Source Project - Issue Tracker.
https://code.google.com/p/android/issues/detail?id=41227.

Signed-off-by: Max Liao <liaops@embedinfo.com>