You could write a complete from-scratch decoder, and be sued if you distribute it.
This is the case with MPEG-2 formats used in DVD Video, and the reason that the VLC Media Player exists as a French student research project distributed as source code instead of a normal library.
This is the case with MPEG-2 formats used in DVD Video, and the reason that the VLC Media Player exists as a French student research project distributed as source code instead of a normal library.
Related: https://www.gnu.org/philosophy/software-patents.en.html