Fix the ccl encoder for the case that the output buffer is fullfilled.