Walt Disney Studios had a much more magical earnings report than analysts had expected. The entertainment powerhouse behind Pixar, Marvel, and the world’s most trafficked theme parks logged earnings per share of $1.84, a 3% drop from $1.89 in the prior-year quarter. Disney also reported revenue of $15.3 billion, essentially flat with the year-ago period.

Those results beat estimates. Wall Street was looking for earnings per share of $1.55 on revenue of $15.18 billion. The better-than-anticipated financial picture is attributable to higher broadcast revenues and the increased popularity of its parks, bright spots that off-set declines in Disney’s film division. The company faced difficult comparisons because it did not field any “Star Wars” sequel or spinoff during the holidays for the first time in four years. The lack of a “Star Wars” film also took a bite out of licensing profits.

The earnings were announced as Disney is preparing to absorb much of 21st Century Fox’s film and television assets. The $71.3 billion merger is a transformative one that will have long-term affects on the media landscape. The sale could close as soon as this month. Disney hopes that by adding such Fox brands as FX and Nat Geo to its roster, as well as attractive film and television franchises such as the “X-Men” and “Avatar,” it will be well armed against digital upstarts such as Netflix.

To that end, Disney is readying its own streaming service Disney+, which it plans to launch in 2019. Details are starting to leak out about the Netflix challenger. Disney has commissioned a live-action “Star Wars” spinoff series, “The Mandalorian,” that will boast Jon Favreau as the showrunner, and is developing “Avengers” standalone series based on characters such as Scarlet Witch and Loki. This content comes with a hefty price tag — it also requires Disney to forgo traditional sources of revenue. Disney makes hundreds of millions of dollars licensing its shows and films, but it is pulling that content off of services such as Netflix in order to put it on its own platforms.

“Building a robust direct-to-consumer business is our top priority, and we continue to invest in exceptional content and innovative technology to drive our success in this space,” Disney chairman and CEO Bob Iger said in a statement.

In a call with analysts following the report, Iger reaffirmed the commitment, saying, “This is a bet on the future of this business” and predicting that “long-term this business will become an important part of Disney’s bottom line.”

Disney’s film unit released the hits “Mary Poppins Returns” and “Ralph Breaks the Internet” during the final three months of 2018, as well as the box office bomb “The Nutcracker and the Four Realms.” Film revenues for the quarter decreased 27% to $1.8 billion and segment operating income decreased 63% to $309 million.

Broadcasting revenues for the quarter climbed 12% to $1.9 billion and operating income increased 40% to $408 million, which Disney attributed to stronger ad sales and licensing fees it charged Hulu and Netflix.

Cable revenues for the quarter increased 4% to $4 billion, but operating income at the division fell 6% to $743 million. Disney chalked up the drop in profits to higher programming costs at ESPN.

Revenues in the parks division jumped 5% to $6.8 billion and operating income increased 10% to $2.2 billion. Disney said the better results were because of higher occupancy at its domestic resorts and an increase in guest spending on food and merchandise.

Disney has started to break out direct-to-consumer revenues, a sign of the importance that the company and Iger are placing on the nascent business. For the quarter, revenue decreased 1% to $918 million and segment operating loss increased from $42 million to $136 million. That was partly due to costs associated with the launch of ESPN+, the streaming arm of the sports channel which debuted in April 2018. The company is also attributing some of those losses to the expense of creating Disney+. ESPN+ has 2 million subscribers, more than doubling its paying customers in six months, Iger said.

Disney has been a favorite of theater owners, not just because it makes blockbusters such as “Black Panther” and “Star Wars: The Last Jedi,” but due to its support of traditional theatrical windows. The exhibition space is under pressure from other studios to allow them to release movies on home entertainment platforms within weeks of their debuts in cinemas. Iger said that Disney+ will operate with traditional windows, but he did leave the door open for a possible change, telling analysts that there may be an “opportunity down the road to adjust the windowing.”

Disney shares closed Tuesday at $112.66, up just under 1%. The stock continued to climb in after-hours trading.