Open "System Preferences" -> "Displays"
Bottom of the Displays page you will see "Airplay Display" : In the drop down select the <TV/device which support Airplay>
Once it is connected, In the Menu bar, you will see two rectangles. you can click this to turn it off. (problem is it shows only you are mirroring). Apple --> This is not intuitive, hope it will be fixed soon.