Similar shit happened to my cousin when we were at the beach vacationing after graduation. He was coming home from blockbuster at 10am and pulled over for not wearing a seatbelt. He had smoked but he swallowed it when he saw the cop. They couldn't find anything, they put gloves on and stuffed their fingers in his mouth and came up with a piece of tobacco from the blunt. They impounded his car, arrested him, he spent his senior money on a lawyer and it was dismissed.
They don't give a fuck, the burden is on you to prove you're innocent. If you're poor, uneducated, or just fucking unlucky they can fuck you hard, especially if you're already in their system for a previous crime.