Increasing inflation has stunted consumer spending in 2022, leading many stocks to suffer from a stock market sell-off. The Nasdaq Composite index has fallen 29% since January as investors fear for the short-term prospects of companies across multiple industries.

Walt Disney (DIS -1.52%) and Amazon (AMZN -2.50%) have each suffered at the hands of macroeconomic headwinds, with their stocks falling between 40% to 44% year to date. However, as these companies are responsible for a significant market share in their respective industries, the decline in their share prices might signal that it's an excellent time to buy.

After all, it's always best to invest in a company's long-term outlook rather than the short-term risks of a potential recession that might or might not occur. So which one is the better buy, Disney or Amazon? Let's find out. 

Disney 

As a titan of the entertainment industry, Disney has had a rough few years. The COVID-19 pandemic resulted in theme park and movie theater closures that took a massive bite out of the company's revenue. However, reopenings have made 2022 a transitionary year for Disney as it works to maximize profits at its parks and grow its streaming business. 

The fourth quarter of 2022 brought concern for its media and entertainment segment, which saw revenue fall 3% year over year to $12.7 billion and operating income plunge 91% to $83 million. The segment encompasses all of Disney's earnings from its streaming, film, and TV businesses. It primarily suffered from the company's $30 billion content spend throughout 2022 to grow Disney+.

Disney's investment in the platform may seem excessive. It has spooked investors, who sent Disney shares falling 7% after its Q4 2022 results were posted. But the company has seen returns in the form of subscribers. Disney reached a total of 235.7 million streaming subscribers in its latest quarter, beating Netflix's 223 million.  

Disney has had to make a hefty investment in streaming to achieve its current dominating position, with Disney+ accumulating 164.2 million members in three years. Comparatively, Netflix took 12 years to reach the same figure after launching in 2007. With the $372 billion streaming industry expected to see a compound annual growth rate of 19.9% until at least 2029, according to Fortune Business Insights, Disney could be in prime position to see major gains in the long term. 

Additionally, in its Q4 2022 report, Disney revealed that it expects Disney+ to reach profitability in 2024. Along with monetizing former complimentary services like Fast Pass in its theme parks to raise its revenue per visitor, Disney could be the king of streaming and home to a thriving parks business in a few years. 

Amazon

As a titan of e-commerce and cloud computing, Amazon has enjoyed years of dominance in two immensely lucrative industries. However, declines in consumer spending throughout 2022 have hit the company hard, which was evidenced in its latest quarterly report. 

In Q3 2022, Amazon reported revenue of $127.1 billion against analysts' expectations of $127.46 billion.  The company's projections for its fourth-quarter earnings also did little to ease investor worries. The company anticipates between $140 billion and $148 billion, while analysts at Refinitiv expected $155.15 billion for the next quarter.

While declines in revenue may not be so surprising in the current economic climate, the most concerning part of the quarter came from the company's cloud computing service, Amazon Web Services. The segment saw revenue rise 27.4% year over year to $20.5 billion against Wall Street forecasts of $21.1 billion. The revenue miss signals slowing growth for the segment as revenue increased by 33% in Q2 2022 and by 39% in Q3 2021. 

With its 37.8% market share in e-commerce and a majority 34% share in cloud computing, Amazon will likely come back strong over the long term. However, with slowing revenue in Amazon Web Services -- its fastest-growing segment -- and the likelihood of continued declines in its e-commerce business thanks to a potential recession, Amazon may be a risky investment for now.

Moreover, Amazon's price-to-earnings (P/E) ratio still stands at 86 despite steep declines in its stock price, and the company suffered $4.97 billion in negative cash flow in the latest quarter. By contrast, Disney shares trade at a P/E of 53, and the company produced free cash flow of $1.37 billion.

Disney had a rough quarter, but its excellent long-term prospects in streaming and excess cash to make it through a potential recession make it a more attractive investment than Amazon today.