Set currentCallbackId on encoding start
Clear encoding  state on encoding error handler