Merge "CCodec: fix corner cases"