I recently started playing Black Ops II on my PS3 again. A few months back, we had thought our PS3 had kicked the bucket, but it turns out it started working again, and didn't give any problems since. However, when I start playing Black Ops II, about 30 minutes to one hour into gameplay, the PS3 will get the Yellow Light of Death and shut off. I told my brother about this, and he insisted it was because there was stuff behind the PS3 and it was not receiving proper ventilation. I told him this was not the case, because I ran the PS3 for 3-4 hours on Netflix and YouTube, and it did not get the Yellow Light. After he cleared the back side of the PlayStation and tried playing Black Ops II, he still got the same problem I did. We have many other games, such as GTA IV, Minecraft, NBA 2K14, but when running these games, none of those problems occur. What could be causing the Yellow Light?
YLOD is, apparently, often caused by the not-so-good thermal paste on the CPU and RSX chips. (I know nothing about PS3 gaming but I looked up the YLOD and found this information.) It obviously isn't faulty hardware if other games work fine.
Try using isopropyl alcohol to clean the thermal paste off the aforementioned chips and replace it with something like Arctic Silver- tutorial here. If that doesn't work, I honestly don't know what the problem is. Good luck!