Gains in the cable division and double-digit increases in content licensing for NBCUniversal’s film and TV units boosted Comcast’s fourth-quarter earnings.

The media giant also reported realizing $12.7 billion in net income tax benefits in the quarter thanks to the federal tax reform legislation passed last month. The earnings also reflect a $250 million charge taken in the quarter as the result of a settlement of a patent infringement lawsuit with Sprint.

Comcast’s fourth quarter revenue was up 4.2% to $21.9 billion. Earnings per share were up 8.9% to 49 cents per share, in line with analysts estimates for the quarter. Adjusted earnings for the quarter were flat at $6.75 billion.

For the full year, Comcast pointed to record earnings for NBCUniversal’s film unit, with adjusted earnings rising 83% to $1.3 billion. The film unit’s fourth quarter, however, suffered from tough comps against the performance of “Sing” in the year-ago quarter.

“In 2017, we achieved strong financial and operational results while also delivering new innovations, experiences and must-see content to people around the world. At Cable, our best-in-class products and continued focus on the customer experience drove healthy EBITDA growth balanced with strong customer relationship net additions,” Comcast chairman-CEO Brian Roberts said. “At NBCUniversal, our Film business achieved record profitability, our Theme Parks delivered record attendance, and our TV business produced strong results – demonstrating the power of our sports, news and entertainment content. We are excited to have the Super Bowl on NBC, followed by the 2018 Winter Olympic Games in PyeongChang.”

For the quarter, Comcast’s cable division kept its net video losses to 33,000 while high-speed Internet customers increased by 350,000 from the year-ago quarter. That influx and rate increases helped cable revenue climb 3.4% to $13.3 billion for the quarter. Adjusted earnings were up 4.2% to $5.4 billion. Advertising revenue plunged 12.4% to $629 million in the absence of political dollars that flowed in the fourth quarter of 2016. Programming expenses climbed 10%.

At NBCUniversal, revenue for the quarter climbed 3.9% to $8.8 billion while earnings were up 6.4% to $1.9 billion.

The cable networks segment saw revenue and grow 7.5% to $2.7 billion while adjusted earnings spiked 9% to $1 billion. Content licensing and other revenue ballooned 34.5% in the quarter. The cable networks performance was offset by lower ratings and subscriber declines.

NBCU’s broadcast unit was fueled by retransmission consent revenue gains (up 70%) and content licensing (up 19% to $632 million). Advertising revenue slid 6.5% compared to the year-ago quarter which was boosted by political spending in a presidential election year. It all added up to a 26.3% decline to $194 million in adjusted earnings for the quarter.

Comcast CFO Michael Cavanagh said the company expects broadcast retransmission consent revenue to grow by $200 million in 2018 to $1.6 billion.

The film unit posted a 5.2% decrease in revenue to $1.7 billion for the quarter, pulled down by fewer releases, but adjusted earnings spiked 89.7% to $230 million, thanks to lower programming and production costs. Home entertainment revenue took a 19% dive while content licensing grew 21.2%.

Theme parks had a strong quarter, fueled by higher spending per person in the parks and the success of the Wizarding World of Harry Potter attractions in Hollywood and Minion Park in Japan. Revenue increased 8.7% to $1.5 billion. Adjusted earnings were up 3.2% to $661 million.

Comcast also said the company would boost its annual dividend payment by 21% and that its board has authorized another $5 billion in stock buybacks for 2018.