VLC relies on open source media decoding libraries and projects. Thanks to the mechanisms and math behind many video/audio encoding schemes being public knowledge due to whitepapers on the topics in question being available and so forth, these can be reverse engineered by dedicated nerds who are way better at this sort of thing than me. As long as you're not explicitly circumventing DRM there's nothing the owners of proprietary codecs can do to anyone making a compatible decoding library in a clean room fashion, especially as mentioned elsewhere nobody is charging any money in the process. You're licensing the code, not the method.
I imagine this is at least partially why the Jean-Baptiste Kempf is so adamantly against selling, monetizing, or allowing the VLC project to be bought out in any way whatsoever.