A codec is not necessarily your problem. Do yo have a lot of other software installed on your system?
What you are experiencing is sometimes due to Vegas conflicting with something installed on the system, something running in the background or a bad driver somewhere.
Try removing all Vegas related tools you have installed and after rebooting, install Vegas Pro 17 alone. Yeah its cumbersome, i know, but you need to find a solution for your problem.
Steve Rhoden (Cow Leader)
Film Maker & VFX Artist.
Owner of Filmex Creative Media.
Samples of my Work and Company can be seen here:
https://www.facebook.com/FilmexCreativeMedia