i frequently correct people who misaddress my friends. Wicked Wahine is exactly dead on. For casual incidents, like the guy at Starbucks, it might not seem worth it to say anything but a quick, quiet correction, "No, i'm a ______", no further explanation required might actually make them be more careful in the future and might make you feel better.
Correcting repeated behavior of friends and family is trickier but, of course, even more important. If you can't get through to them, you have some difficult choices to make.
In any case, ignoring it is probably the worst thing you could do because that will mean it just won't ever change.
That said, as someone who is friends with many trans* folks and who is personally of the belief that you are whatever you tell me you are, period, i've seen multiple friends through the earliest stages of their transition, having known them as their biological sex for years prior. While i instantly accept their gender identity upon being told, many years worth of habit can be hard to break! It's not for lack of respect or caring or empathy if i slip up and use the wrong pronoun with a newly out friend and i always feel AWFUL when it happens. This has been especially true with some trans men who, even before transition, presented very masculine appearances so until medical intervention, their physical appearance and clothing choices didn't change much, if at all, which is not to judge or suggest that those changes, or even the medical steps are necessary, but it means that i might mess up and say the wrong thing. i'd hope that, as a friend, they would remind me and forgive my screw-ups, initially. i'd much rather have them point out my mistake and correct me, give me the opportunity to apologize and work harder, even if they get angry or hurt, than to have them suffer silently, clam up or withdraw or shut me out when the chances are pretty high that i didn't even realize i said it. i hope that they wouldn't just assume that i'm being rude or rejecting their identity. Sometimes gentle reminders are necessary even in the case of well-meaning and accepting people who may just need to be nudged a few times to help them change ingrained habits. i imagine this would be even more difficult for even the most loving and accepting parents and other relatives. If my sister came out as a transman, i would instantly embrace him as a brother but after 24 years of saying "her" and "my sister", the words would be a hard habit to break.