Gonk has the libstagefright libraries which expect to be able to dynamically load shared libraries provided by the carrier or phone maker which contain the decoders. They are expected to have all the relevant licenses.
In the case of desktop Mozilla could take the same approach (use system libraries, expect OS supplier to provide licensed decoders) but some platforms would miss out on support if the OS supplier doesn't provide the decoders.