Hi, I found this on a website where people were having similar problems. It's a long shot but just maybe... "Firefox would freeze/crash (reporting a problem with flash) or my pc would restart after a random amount of time on youtube. After trolling for hours on forums trying everything i read (update drivers, disable hardware accelerator etc), somebody said try scanning for viruses. I really didn't expect that to be the problem as Avast antivirus was always running on my comp but thought i might as well try, so i installed malwarebytes and done a full scan. My pc was loaded with malware and after removing it all and a quick restart i haven't had the problem since. Its worth an hour of your time trying it if you're still having this problem." Hope you find a solution mate.