As Max said in notes, both are correct.
Which one you will use depend on what you want to say. Let's take another example :
Il regarde voler les oiseaux / les oiseaux voler.
In the first case you say that what he's looking at is the flight of the birds. You can suppose that if birds weren't being flying, he would not be interested in looking at them. You can also suppose that if it were not birds but bees, he would be looking their flight too.
In the second one, you say that he is looking at the birds, who are flying. The nuance is that he's interested in the birds. Here you can suppose that he would look at the birds eating with the same interest, but maybe not at bees flying.
As often, it's a nuance, the difference is much lighter than what I said.