How to protect against this?
You should already have the required codec on your system.
If not, you have 2 choices:
1. don't watch that video
2. download the required codec from a reliable source not from the "Click Here to Install" button.
Unfortunately there will always be dummies who will click on anything just because it said
ClickHere