There is a confidence and courage about him also when he is confronted by Boromir. "Your words would seem like wisdom, but for the warning in my heart" is a pretty insolent thing for a little hobbit to say to a warrior of Gondor.
I think it happened at the shoreline when he tucks the ring back in his pocket and shoves the boat out from shore. Whether the motivating words from Gandalf were a vision, or just a memory... He became his own master... and the effect seems to have been a calming one.
Without checking, I think we get more fear, doubt and increasing fatigue from Frodo at this point in the book, but I am pleased that Jackson gave us this impression that Frodo was OK with it and serene. Angst is an unsatisfying place to leave us at the end of a film!
He is no longer a shy passenger in the fellowship, looking for direction from someone else, he has become the master of his own destiny.