hi, i realise this post is very old now, but i have encounteded these problems in FCP7 and here are the solutions (NO DOWNLOADS, NO TINKERING AROUND WITH SETTINGS)
for some reason, there are certain files that my final cut does NOT like. when batch converting my iphone footage to create my youtube videos, i keep everything at prores422(LT) which just seems to work fine on my old White series macbook from 2008. anyway, audio sync issues occur when you have lots of footage in your bins and project that are NOT the same framerate. i had a few vids that were 24 FPS, 29.9 fps, and 25 fps. MAKE SURE (by pressing CMD-0 that your project is set to the Framerate you want, then ensure ALL framerates are restricted to the same ammount when converting (if you dont convert your footage before editing in FCP, god help you, i pity you). i tend to stick with 25 FPS as this seems to have no problems! i convert using quicktime pro, and always choose 25 FPS as the ramerate.
the issue with CODEC NOT FOUND, A COMPONENT MAY BE MISSING seems to come about when using JPEG images. i figured this out due to having several projects all the same settings that export fine, and one project with the same settings bringing up that error message. i realised the only difference was i was using a JPEG image as the background (its just an audio track with the album art as the video) which played back in FCP fine but would NOT EXPORT. and i tried everything. when i deleted the jpeg image out of the timeline, the video exported fine so i converted the image to TIFF and hey bingo presto shazam, it worked.
i tried everything people had said in this post, what i have written is the only thing that fixed it. hopefully my revelation will help someone else!