When connected to tv apple logo shows up then screen goes black
So i bought a mac mini off ebay last week. I've got it connected to my computer via mini display port, and i'm using my tv as the monitor (via hdmi). So what happens when i turn the computer it shows the boot screen, and makes the startup sound.. then it shows the apple symbol for about 45 seconds, the screen goes blue, and then to black.. I have tried holding down c, at boot, i've also tried shift, and also p+r+cmd+ctrl and still no luck. I've tried everything that I can think of. I have no idea why it's doing this. Any help appreciated.