Change error sentinel from 0 to -1 for frame encoder.