Shares of GoPro (GPRO -1.12%) have been battered badly on the stock market this year amid the broader sell-off, but the action camera specialist has been showing signs of life of late.

GoPro has surged 20% in the last month on the back of a broader recovery in technology stocks. The stock has headed north despite the company's mixed second-quarter results that were released on Aug. 4. While GoPro's top and bottom lines exceeded expectations, the company's outlook turned out to be much worse than expected and points toward a slowdown in sales.

Does this mean that investors should stay away from GoPro stock? Let's find out.

GoPro's results weren't as bad as they may seem

GoPro's Q2 revenue was flat year-over-year at $251 million. The company's top line took an $8 million hit from a stronger U.S. dollar. GoPro's adjusted earnings fell 33% year-over-year to $0.08 per share. Wall Street's expectations were low, however -- analysts were expecting GoPro to deliver $0.07 per share in earnings on $239 million in revenue.

GoPro edged past those estimates, but it failed to increase its revenue and earnings. However, it is worth noting that the company's revenue and earnings were at the higher end of its guidance range. Additionally, GoPro sold 700,000 action cameras during the quarter, compared to its expectation of 675,000 units. The average selling price (ASP) of its cameras, however, came in at $392, compared to its expectation of approximately $400 per unit.

The lower-than-expected ASP can be attributed to higher shipping costs, the stronger U.S. dollar, and a delay in the availability of high-margin accessories. Looking ahead, the bad times are probably here to stay for GoPro, as its top and bottom lines are on track to contract once again in the current quarter. The company has guided for $300 million in revenue and adjusted earnings of $0.17 per share in Q3.

The company delivered $0.34 per share in adjusted earnings on $317 million in revenue in the year-ago period. GoPro management said on the latest earnings conference call that a reduction in inventory levels by big box retailers, as well as a potential weakness in demand on account of surging inflation, high interest rates, and unfavorable exchange rates, will be headwinds for the business this year.

The company has reduced its action camera sales forecast for 2022 to 3 million units at the midpoint from its prior expectation of 3.2 million units. It shipped 3.14 million units in 2021. GoPro also says that unfavorable foreign exchange rates will hurt its revenue by $33 million this year compared to 2021.

In all, it doesn't look like GoPro will be able to sustain its newly found momentum on the stock market given the headwinds discussed above. But if the stock heads lower, savvy investors may want to buy GoPro, as the company is setting itself for long-term growth.

Savvy investors shouldn't miss the big picture

Analysts expect GoPro's performance to start improving and clock 10% annual earnings growth over the next five years. A closer look at some of GoPro's metrics from last quarter will tell us just why the company should be able to stage a turnaround.

GoPro's efforts to diversify its business beyond the hardware-centric action camera business are gaining traction. This was evident from the 65% year-over-year growth in the company's subscriber base to 1.91 million, indicating that customers are opting to pay for services such as cloud back-up, editing, and sharing tools.

GoPro's subscription revenue increased 71% over the prior-year period to $20.1 million. The subscription business produced 21% of the company's direct-to-consumer GoPro.com revenue channel last quarter, a nice increase over the prior-year period's contribution of 13.4%.

The direct-to-consumer channel accounted for 38% of the company's top line last quarter at $95 million. The segment's revenue was up 9% year-over-year. GoPro's gradual shift toward the direct-to-consumer model since 2018 has had a positive effect on the company's margin profile, a trend that could continue in the long run as the company generates more revenue from this channel.

All this indicates that investors should keep a close watch on shares of GoPro and consider using any dips as buying opportunities, as this tech stock could step on the gas starting next year.