"Wonder Woman" was a hit, and that's good news for AT&T Inc. (T) - Get AT&T Inc. Report , which is counting on hits at the Warner Bros. movie studio to warrant financing an $85.4 billion acquisition of its parent, Time Warner Inc. (TWX) .

The film starring Gal Gadot helped bolster revenue and adjusted operating income at Time Warner, which early on Wednesday, Aug. 2, posted results that exceeded analyst expectations. Shares near midday were little changed at $102.50, up 8 cents and still below AT&T's takeout price of $107.50. 

But looking beyond "Wonder Woman" is the ever-darkening cloud that is advertising at both Time Warner and across the cable industry.

As expected, ad sales at Time Warner fell in the second quarter compared with the same period a year earlier, as 2016 included the Final Four of the NCAA men's basketball tournament. (CBS Corp. (CBS) - Get CBS Corporation Class B Report televised the semifinals and final in 2017.) At Time Warner's Turner networks, which include TBS, TNT and CNN, ad sales dropped 6% in the quarter, slightly better than consensus expectations for a 7% decline.

Yet when the results of CNN, which is enjoying a banner year despite President Trump's grumblings, are stripped away, a more worrisome picture emerges about Time Warner's entertainment networks, historically among the top draws on cable TV.

In June, TNT suffered a 35% ratings plunge among viewers 18 to 49 years old, due to tough comparisons from the NBA playoffs, while TBS posted a mere 2% ratings increase, according to Nielsen NV (NLSN) - Get Nielsen Holdings Plc (NLSN) Report data. At CNN, ratings jumped 21% in June.

In revealing comments about the current quarter, Time Warner guided down expectations for third-quarter ad sales, forecasting a decline in the low single digits. The lowered guidance for the third quarter comes despite Time Warner not having the same difficult comparison that it had in the second with the 2016 NCAA tournament.

For its part, Time Warner said the drop it's seeing in the current quarter is due to lower ratings at its networks, an ongoing issue despite lots of investment in new content at TBS and TNT. 

Ratings and ad sales, of course, are closely linked, and behind these audience declines is the nagging issue of viewer fragmentation. Audiences, young and older, are spending more of their viewing time on Netflix (NFLX) - Get Netflix, Inc. (NFLX) Report and the ever-growing selection of videos on Facebook (FB) - Get Facebook, Inc. Class A Report and Alphabet Inc.'s (GOOGL) - Get Alphabet Inc. Class A Report YouTube. As a result, pay-TV subscriber rolls continue to shrink. Losses for the second quarter are expected to reach as high as 1 million.

TheStreet Recommends

That means less time for cable networks. Time Warner's expectations for weaker TV ad sales in the third quarter comes as Scripps Networks Interactive Inc. (SNI)  , which this week agreed to be acquired by Discovery Communications Inc. (DISCA) - Get Discovery, Inc. Class A Report , indicated it's also seeing a weakening environment for cable TV advertising.

Scripps has lowered its financial guidance for the rest of 2017, citing "ratings and impression softness in the U.S. market." The owner of HGTV, DIY and the Food Network said it expected sales to increase 4% rather than an earlier forecast for 6%. Profit at its television networks will be "approximately flat for the year" rather than rise 3%.

The upshot is still more concern about the future for companies heavy on cable networks, Bernstein Research media analyst Todd Juenger said in an investor note Wednesday.

"Coupled with the guide-down at Scripps and the overall sharp decline in [18-to-49-year-old] audiences across the industry, it's hard to feel confident about [second-half 2017] advertising, generally," he said.

To be sure, AT&T sees challenges on the advertising side at Turner as a risk worth taking. AT&T is betting it can do more with Time Warner's content as it seeks to use its wireless service to challenge Facebook Inc.'s and Google's dominance of digital advertising. CEO Randall Stephenson already has shown his willingness to leverage Time Warner content for his wireless business, as evidenced by AT&T not counting time spent at its online DirecTV Now service against its wireless usage plans.

(All is fair in love and war and wireless competition with Verizon Communications Inc. (VZ) - Get Verizon Communications Inc. Report , T-Mobile US Inc. (TMUS) - Get T-Mobile US, Inc. Report and Sprint Corp. (S) - Get SENTINELONE, INC. Report .)

The question for Stephenson is how to increase ad sales at TBS and TNT.

Facebook and Alphabet are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer and the AAP team buy or sell FB or GOOGL? Learn more now.

More of What's Trending on TheStreet: