SAN JOSE, Calif. - The Calgary Flames' ability to bounce back from tough losses is the biggest reason for their early-season turnaround.

Karri Ramo made 32 saves for his third career shutout and Jiri Hudler scored both goals to lead the Flames over the San Jose Sharks 2-0 Wednesday night.

Hudler broke a scoreless tie with a goal in the second period and sealed the game with an empty-netter on the power play late in the third. Calgary rebounded a night after losing 3-2 in Anaheim to win for the ninth time in 10 games following a loss this season.

"I think everybody here in the room knows that if we just keep playing our game we're going to win many games," Ramo said. "In the long run, we don't have to panic. Just play our game and focus on our own game."

Antti Niemi made 17 saves for the struggling Sharks, who have lost four straight. San Jose hasn't led at any point during the skid, marking the first time since February 2013 that the Sharks have gone four straight games without a lead.

"I think the chances are there," forward Patrick Marleau said. "Hopefully it's like a big buildup and it's going to break soon and we'll start getting on a winning streak."

After playing a record 16 of their first 21 games on the road, the Sharks were hoping to find their stride on a six-game homestand. But they have lost the first three games in that stretch and have just two wins in eight games at the Shark Tank this season.

"Every game is critical," coach Todd McLellan said. "We're in the thick of it right now. The rest of this homestand is critical but so are the next two road games and the home games after that. We're an everyday team right now just scrambling to get back to the point where we can get our heads above water."

Ramo did his best to extend the Sharks' misery, beating them for the third straight time. He has allowed only two goals on 94 shots in that span. He was tested a bit in the third, but Marleau was stopped by defenceman Dennis Wideman from the side of the net and Ramo stopped Joe Thornton on a rebound chance.

The Sharks also had chances to get on the board early in the second, but Marleau hit the crossbar during a power play.

Ramo posted Calgary's first regular-season shutout in San Jose since Fred Brathwaite beat the Sharks 1-0 on Jan. 3, 2001. Miikka Kiprusoff also shut out San Jose in the 2004 Western Conference finals.

"He's definitely the reason we won that game," Flames defenceman TJ Brodie said of Ramo. "He made some big saves when we needed him to. He was solid all night."

The Flames got on the board late in the second period during 4-on-4 action, taking advantage of a tired group of Sharks at the end of a long shift. Hudler started the play by taking the puck into the offensive zone and then left it for Brodie. He sent it back to the slot for Hudler, who completed the pretty give-and-go with a wrist shot past Niemi to make it 1-0.

Ramo preserved the lead late in the period with a strong glove save against Tommy Wingels.

The Flames had a couple of prime scoring chances early, but Niemi robbed Johnny Gaudreau at the side of the net after a wild scramble in the opening minute and then stopped Paul Byron after a turnover by James Sheppard later in a scoreless first period.

Some of the biggest excitement was generated by a group of Edmonton Oilers fans sitting at ice level who had junior hockey star Connor McDavid's name taped on the backs of their jerseys. They alternated cheers for the Sharks with derogatory chants about the rival Flames.

NOTES: Flames F Mikael Backlund had an abdominal procedure and is listed as week-to-week. ... Calgary placed F Devin Setoguchi on waivers. ... Former San Jose State G Ryan Lowe was signed as a backup to Niemi after Troy Groesnick got hurt in practice Tuesday.