Time Warner Inc, which is in the process of being bought by AT&T Inc, reported a much better-than-expected quarterly profit, driven by the box-office success of its latest superhero movie "Wonder Woman".

The company's shares were up 1.2 percent at $103.74 in premarket trading on Wednesday.

Revenue from the company's Warner Bros unit, which includes the movie business, rose 12.4 percent to $2.99 billion, topping analysts' average estimate of $2.90 billion, according to data and analytics firm FactSet.

"Wonder Woman", starring Israeli actress Gal Gadot, grossed about $800 million worldwide through July 31, the company said on Wednesday. Spurred by the smashing success of the movie, Warner Bros last month announced a December 2019 date for a sequel.

Revenue in the company's Turner unit, which includes CNN and sports channel TNT, rose 3.1 percent to $3.1 billion in the second quarter as higher subscription revenues more than offset declining ad revenue.

Like other media companies, Time Warner has been struggling to keep viewers hooked to its channels as they flock to online streaming services such as Netflix and Amazon.com Inc's Prime Video, a trend that is taking a toll on ad sales as well.

Revenue from HBO, home to hit fantasy show "Game of Thrones", rose slightly to $1.48 billion. Analysts were expecting $1.51 billion, according to FactSet.

The latest season of the show, which premiered last month, has already gained a lot of traction.

Net income attributable to Time Warner's shareholders rose to $1.06 billion, or $1.34 per share, in the second quarter ended June 30, from $952 million, or $1.20 per share, a year earlier.

Excluding items, the company earned $1.33 per share.

Revenue rose 5.4 percent to $7.33 billion.

Analysts on average were expecting a profit of $1.19 per share and revenue of $7.3 billion, according to Thomson Reuters I/B/E/S.

The company also reaffirmed its outlook for the full year and said it expects to close its merger with AT&T before the end of this year.

Reuters - Reporting by Rishika Sadam in Bengaluru; Editing by Shounak Dasgupta and Saumyadeb Chakrabarty