Whenever I try to open the gallery it doesn't opens and music starts playing?
Well that's odd. Which gallery app are you using?