mpegvideo: split the encoding-only parts of frame_start() into a separate function