Sometimes all it takes is one pitch going your way. In Wednesday’s case, that one pitch was of the inning-extending variety.

The Braves, up 2-0, scored four more times in the second thanks to their extra out, coasting to a 9-2 win in windy San Francisco. As it turned out, those six unearned runs were more than enough.

It began with Ronald Acuna batting with two on and two out. He struck out swinging on a slider that eluded catcher Buster Posey, allowing Acuna to reach first, Ozzie Albies to score and the inning to continue.

One pitch later, Dansby Swanson planted Jeff Samardzija’s cutter into the stands. Two pitches following, Freddie Freeman went deep himself. It capped a six-run inning in which none of the runs were charged to Samardzija (he had a throwing error earlier in the inning).

“The extra outs in an inning are huge,” Braves manager Brian Snitker said. “You need to build on that because you never know what’s going to happen over the course of a ballgame. It always worries me when you score like that early because there’s so much time to come back.”

Freeman’s home run was his 12th of the year, while Swanson’s was his eighth. Freeman has homered five times in his last seven games.

The Braves didn’t score again until the seventh, when Austin Riley launched a three-run homer to build a 9-2 lead. Riley became the third Braves player in the modern era with four homers in his first eight games. He also showed off the glove at third base, able to man his natural position with Josh Donaldson’s day off.

Riley is hitting .367 (11-for-30) with seven runs, one double and nine RBIs in his first eight games.

“It was the perfect time to bring him up here,” Snitker said. “He’s continued on from what he was doing in spring, really. Just a really great defensive play too. He’s swinging the bat really well.”

Braves starter Max Fried was his usual self, though he fell victim to the long ball twice (Posey, Tyler Austin). He topped at 98 mph in route to his league-high seventh win.

As the cherry on top, Fried collected his first career RBI in the second inning. He hasn’t needed to help his own cause much this season: His 8.94 run support average is the highest in the majors.

“It’s what you expect from him,” Freeman said. “He has one job in his head and that’s to pound the zone. He’s got a special arm, a special left arm. He’s got the mindset that’s going with it. He’s learning how to pitch. He’s studying every single day. It’s starting to come together. He gives you a chance to win every single game and that’s all you can ask for.”

Reliever Anthony Swarzak made his Braves debut in the seventh inning, striking out a pair and getting a soft-hit grounder to complete a clean frame.

If the Braves win Thursday’s matinee, it’d be their first time taking consecutive series in San Francisco since 1997-98 (they swept three games here last season). Kevin Gausman will oppose Giants lefty ace Madison Bumgarner in the finale.