If you record video from your iPhone 3GS in any orientation other than with your iPhone held horizontally and the home button on the right side (as shown in the image below), your video will be rotated when accessed from iPhoto Videos in iMovie versions prior to 8.0.4.