First of all, homemade flavored oils are potentially very dangerous. Botulism will grow in the oil and there is nothing the home kitchen can do to prevent it. If you make a flavored oil at home, it's good for 10 days in the fridge. Beyond that, it's a danger.
I'm not sure about the vinegar, someone else will chime in on that.
"If you want to make an apple pie from scratch, you must first create the universe." -Carl Sagan