San Francisco 49ers left tackle Joe Staley, who is one of the most tenured players on the roster, considered making the 2017 season his last in the NFL. He was the guest during this week's episode of the "49ers Insider" podcast with Matt Maiocco of NBC Sports Bay Area.

Staley shared that earlier in the season, he felt his play had diminished from previous years.

"I wasn't coming into work with the same kind of enthusiasm that I usually come in with," Staley told Maiocco.

At the time, the 49ers were winless, had a new staff, and a new direction. Staley sought out head coach Kyle Shanahan to have a conversation about the situation and his future in the NFL. The veteran tackle felt like his career was in a rut.

"At that moment, it was like, 'Oh man, is this how my career is going to end with my knee acting up and not playing well?'" he continued.

RELATED Joe Staley explains why finishing his career with the 49ers is important to him

Staley questioned himself for the first time in his career. He started thinking about his NFL legacy and how it would end. What was the result of Staley's conversation with Shanahan?

"He kind of really got my mind back on track," Staley said. "We had a good conversation. We talked for probably about an hour. [He] just got me refocused and all that."

Staley felt the conversation was beneficial and he is now focused on the 2018 season and his future with the 49ers.

"I feel like I can still play," Staley added.

Staley, who had discussions with his wife regarding retirement, now tells her to expect him to play football for "a little bit longer."

You can listen to the entire conversation with Staley, which includes his impressive rendition of "Hakuna Matata" from "The Lion King," below.