Source: http://feeds.gawker.com/~r/lifehacker/full/~3/sFfuPODKnDE/divfix%252B%252B-repairs-your-avi-files
DivFix++ is a cross-platform .AVI repair program that rebuilds the index file within the .AVI container to restore your movie to a functional state.
DivFix++ can be downloaded pre-compiled for Windows, Mac and Linux operating systems. The interface and operation is straight forward. Tell it where you want the repaired file to be saved, drag and drop some files to be repaired into the Source Files pane of the program and let it loose. Repair time was fairly quick on my mid-level machine and the resource utilization was lower than I expected. The program required no installation, just a simple unzipping, but beyond that I can't vouch for it's portability. DivX++ is cross platform and open source.