fix crash issue of sliceskip and inf-loop in fmo

reported by Mozilla about 1106398 (crash) and 1106404 (infinite loop) issues.
see:
https://rbcommons.com/s/OpenH264/r/962/