When I plug my headphones into my MacBook Pro or when I return to my MacBook Pro after the headphones have been plugged in for a while, sometimes I get no sound, the Sound icon in the Menu bar is greyed out and when I click the Sound up button on the keyboard I get the below icon (see screenshot). If I take the headphones out and wait a couple of seconds then replug them in they work again.
Headphone wise I've seen this happen with a range of headphones from Apple EarPods to Bose noise canceling headphones.
I've seen this happen on two Mid 2012 MacBook Pro models, a 15" and 13", both running OS X 10.10.
Any ideas what's causing this and how I can be resolved?
Just in case any one mentions it, I'm plugging the headphones into the 3.5 mm headphone jack not the cinema audio port.