crashmeister is right.
If avidemux hasn't fixed it yet, you can probably do this:
1. Create the file with avidemux. Lets say it is file1.avi
2. Give this command:
mencoder file1.avi -oac copy -ovc copy -ffourcc DX50 -o file2.avi
2 important notes:
a) The second command (the mencoder one), will be very fast as you will see.
b) I haven't checked this command myself so I don't know the probability of it being perfect.