This is a really good talk I saw in person on this exact subject. Focuses on using rust and the nom library for safe parsing. He opens with a description of how VLC is one of the worst offenders for vulnerabilities historically because it supports so many different file formats / parsers written in c.
> Safe and fast parsers with Nom and Rust
https://www.youtube.com/watch?v=8mA5ZwWB3M0