I encoded in DivX with Flask 0.594 and resulting video has audio and video out of sync. How to fix this ?

Is it possible to fix this now, when I have finished AVI (like it is possible with remuxing on (S)VCDs) or I need to make new AVI (but what to do to prevent the same problem again) ?