es_sink: fix in buffer offset calculation