Warren Buffett once said, "Whether we're talking about socks or stocks, I like buying quality merchandise when it is marked down." The media sector was one such industry which was brutally "marked down" over the past year, due to fears that cord cutters would sap away TV ad revenues. Although cord cutting has certainly affected traditional advertising revenues, the sell-off was arguably too extreme, turning many blue chip media stocks into deep value ones.

I define a "value" stock as one that trades with a 5-year PEG ratio under 1, which indicates that the stock is cheap relative to its projected annual earnings growth over the next five years. When combing through the hard-hit media sector, two media stocks caught my eye -- Viacom (VIAB) and Time Warner (TWX).

What went wrong at Viacom
Viacom stock has declined by approximately 40% over the past 12 months due to sluggish ad sales and weak box office returns. Last quarter, Viacom's media networks revenue fell 3% annually to $2.57 billion, due to lower-rated shows generating weaker ad revenues. Domestic and international ad revenues fell 4% and 2%, respectively, as higher ad prices failed to offset lower demand and currency impacts. Those declines indicated that Viacom's new ad products -- Velocity for in-product placements, Echo for social media campaigns, and Vantage for identifying niche audiences -- still weren't winning over advertisers.

Teenage Mutant Ninja Turtles. Image source: Paramount Pictures.

Filmed entertainment revenue declined 15% to $612 million, with theatrical sales plummeting 44%, as The Big Short and Daddy's Home compared poorly against the worldwide release of Teenage Mutant Ninja Turtles and the domestic release of Interstellar in the prior-year quarter. Viacom's total revenue fell 6% to $3.15 billion and missed expectations by $110 million. Adjusted earnings declined 9% to $1.18 per share, matching analyst estimates.

Looking ahead, Viacom's lack of big hit shows at MTV, VH1, Comedy Central, and its other networks undermine the appeal of its ads. Its lack of sweeping multi-year movie franchises also throttles its ability to generate predictable box office returns. Its biggest film this year will likely be its Teenage Mutant Ninja Turtles and Star Trek sequels this summer, while the Transformers won't return to theaters until 2017.

To boost earnings growth amid these problems, CEO Philippe Dauman plans to sell a portion of Paramount Pictures in the near future. Analysts expect those efforts to help Viacom grow its earnings 8.5% annually over the next five years -- a paltry figure which nonetheless gives the stock an undervalued PEG ratio of 0.9.

What went wrong at Time Warner
Time Warner is in better shape than Viacom, but its shares have still slipped 14% over the past 12 months due to concerns about cord cutters and its theatrical slate. Last quarter, Turner revenues rose 2% annually to $2.66 billion as HBO revenues improved 5.5% to $1.41 billion. However, HBO Now's 800 million subscribers fell short of the one to two million subscribers which most analysts had expected. That figure indicated that HBO's streaming-only solution, which costs $15 per month, could fail to compete effectively against Netflix's $10 per month service. HBO will also struggle to find a replacement for Game of Thrones once the hit series ends.

Revenue at Warner Bros. -- which houses its movie, broadcast TV, and video game businesses -- fell 13% to $3.3 billion due to a lack of hit films measuring up to its Hobbit sequel and the international release of Interstellar last year. But looking ahead, things look brighter with the recent release of Batman v. Superman: Dawn of Justice, the summer release of Suicide Squad, and the holiday release of J.K. Rowling's Fantastic Beasts and Where to Find Them. Those franchise-building tentpole films should pave the way for Warner to generate more stable box office returns over the next few years.

Suicide Squad. Image source: Warner Bros.

Time Warner's total revenue fell 6% to $7.1 billion last quarter, missing estimates by $450 million. Adjusted earnings rose 8% to $1.06 per share, boosted by buybacks but beating estimates by five cents. Looking ahead, analysts expect Time Warner to grow its annual earnings by 16% over the next five years, which gives it a 5-year PEG ratio of 0.9. Time Warner stock looks just as "cheap" as Viacom's, but its impressive portfolio of hit shows and franchises might help it bounce back faster.

But should you buy Viacom or Time Warner?
Activist investors started circling Viacom and Time Warner earlier this year, because both companies were underperforming the market with fairly cheap valuations. Viacom and Time Warner probably won't rally in the near future, but patient investors might be getting a good deal today if they are willing to weather the near-term headwinds.