So many people advise wearing headphones to signal being busy, but that doesn't seem like a good cue. I'm still going to stop and ask a question even if my colleague is listening to music.
Not to mention, the headphones are probably also for blocking out background noise, which you might not want even if you are fine with being talked to directly.