ffmpeg: factor area out of video stream selection code.