I have a mkv file which containes h264 video and AAC 5.1 audio both are variable rate. I tried to convert this movie into DivX format. As of now DivX converter does not support h264 video and AAC audio as input. So, I extracted (demux) video and audio using MKVextract tool. While Audio conversion, Mediainfo reported me that audio track duration is around 336x minutes (5hours, 36minute) which was not correct. Actual length was 116:32 (1h:56m:32sec). Xillisoft also reported that audio track length is 336x minutes and failed to convert extracted AAC to AC3. Then i tried Winamp 5.x Nullsoft diskwriter plug-in to convert extracted AAC to WAV, I was really happy to see after conversion that WAV file was 5.1 channel and its duration was exactly 116:32. After this process I used BeSweet to convert WAV to AC3 and finally I got AC3 audio file with near about same quality sound. In final product there was no out of sync problem.

If somebody is also facing similar problem with variable rate audio, give this mathod a try.