At the time, Elbridge Gerry was the vice president, so with Madison in British hands he would have had to assume the duties and power of the presidency, since Madison was clearly unable to execute those. Probably he would have had the title of Acting President, since Madison was known to be alive and in good health albeit effectively incommunicado. However, I suspect the real executive power would have been wielded by Secretary of State James Monroe.
What I suspect would happen would be a delegation under a flag of truce would approach the British lines in Maryland and call for an immediate in-place cease fire, while dispatching word to Ghent apprising the US negotiators of the situation (chances are the British would dispatch someone likewise to London and Ghent). Probably there's no landing at North Point, no battle of North Point, and no attack on Ft. McHenry. At Ghent, it's not out of the question that the US would be obliged to surrender noticeable amounts of territory: say, the disputed area of northern Maine, which boundary was settled much later IOTL, as well as the Minnesota arrowhead, northern Wisconsin, and much of Michigan including the entire upper peninsula, turning Superior into a Canadian lake--and putting Canada (OK, British North America) squarely in control of the upper Great Lakes.
Andrew Jackson would not have become the folk hero that he did, since the cease fire would have meant no Battle of New Orleans--and thus no Jackson presidency. Rather, I think you'd see a succession of Federalist presidents elected starting in 1816--and that includes John Quincy Adams. I have to wonder, though, if Federalist/northern ascendancy like that would widen/deepen the north/south rift and lead ultimately to a separate, agrarian southern nation--perhaps 20 to 30 years earlier than the CSA that we know.