avconv: use correct output stream index when checking max_frames