The difference is that in the second, the ref has moved forward to chat to the players and so the play stops - or is supposed to. To play on in that instance is disrespecting the ref.
In the first, the ref was out of sight, and was letting play go on...so a quick free kick was on.
He had probably blown th whistle to let play go on.