I used Avidemux v. 2.5 to change a video file's audio from 40 Kbps, 24000 Hz, 2 channels, 0x55 = Lame MP3, CBR to 128 Kbps, 48000 Hz, 2 channels, CBR which caused the audio to be 17 seconds in advance of the video. I ran Avidemux again with a shift of 17 seconds. Now I have video file where the audio starts 17 seconds too early, i e in the absolute beginning of the movie. However, after the 17 seconds have passed the audio starts over again and the audio is in sync with the video.

How do I correct the lead in audio?