Disney+ added 7.9 million subscribers last quarter, beating expectations.

Disney+ added 7.9 million subscribers in the most recent quarter for a total of 138 million worldwide, the company announced Wednesday, helping it avoid the streaming slowdown that has lately tanked the stock price of Netflix.

Like most media companies, Disney’s stock has been pummeled in the wake of Netflix’s announcement last month that it had lost 200,000 subscribers in the first three months of the year and that it expected to lose two million more this quarter. After years of applauding media companies for losing billions on streaming, investors are now applying pressure to find a path to profitability.

The release of films like Pixar’s “Turning Red” helped Disney+ attract subscribers in the first quarter, which ended April 2. Shares of Disney were up about 4 percent in after-hours trading following the earnings announcement.

Disney’s results are a bit of good news for Bob Chapek, the chief executive, who has been dealing with a public relations crisis stemming from the company’s response to Florida school legislation that, among other things, restricts classroom discussion of sexual orientation and gender identity. (Disney is the state’s largest private employer.)

The company initially refrained from speaking out against the bill publicly but reversed itself after an internal revolt. Mr. Chapek then denounced the legislation, which earned him the ire of conservatives, including Florida Gov. Ron DeSantis. Last month, Republican lawmakers in Florida revoked a 1967 law that allowed Walt Disney World to function as its own quasi government. In the wake of the uproar, Geoff Morrell, who joined Disney in January as its most senior government relations and communications executive, resigned last month.

Revenue at Disney increased 23 percent compared with last year, to $19.2 billion, but missed analyst expectations. Disney said it took a hit from a decision to pull some of its content back from other distributors in favor of its own channels, which meant a reduction of $1 billion in licensing revenue as part of a trade-off to grow its direct-to-consumer business.

Disney reported earnings per share of $1.08, missing analyst expectations of $1.17.

Disney’s theme parks unit came roaring back from a year ago, when the Covid-19 pandemic stunted in-person attendance. Revenue in the division doubled compared with the same period last year, with a new line-skipping system driving increases.

As streaming services look for more subscribers, India is shaping up to be an important market. Deep-pocketed media companies are preparing to bid for rights to show cricket matches from the popular Indian Premier League. Disney currently has the rights to stream the matches on its Hotstar service, which it acquired in its 2019 megadeal with 21st Century Fox. Losing those rights could be a blow. However, Mr. Chapek has said that Disney can reach its subscriber targets even if it does not retain those rights.

This is a developing story. Check back later for more details.