sometimes reecncoding the .avi`s with virtualdub back to .avi`s can sort out the problem.
if tmpgenc or virtualdub cannot sort out the files, then i`ve not found much else that can.
sometimes files have been renamed from .asf to .avi. try renaming them and running them through asftools
there are a lot of formus and guides for tmpgenc at www.dvdrhelp.com, it may be some of the setting that you are using.