libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.
zlib License
433 stars 146 forks source link

Improve coexistence of internal and external decoders #434

Open ccawley2011 opened 2 years ago

ccawley2011 commented 2 years ago

This is potentially useful to allow building with libvorbis, libFLAC and libmpg123 for the reasons described in https://github.com/libsdl-org/SDL_mixer/issues/427#issuecomment-1186630491, while still having the internal libraries as fallbacks if dynamic loading fails.

TODO:

slouken commented 2 years ago

If both are enabled and the external library is loaded dynamically, does it fall back to the internal codec if the external one fails?

If we do this, we probably want similar logic for SDL_image

slouken commented 2 years ago

I'm kind of inclined not to do this, FYI. It's the worst of both worlds where you might or might not be using the internal or external codec, and it'll be harder to track down bugs. I'm inclined to have distributions use external codecs, and standalone builds use internal codecs and call it good.

smcv commented 1 year ago

I'm kind of inclined not to do this, FYI. It's the worst of both worlds where you might or might not be using the internal or external codec, and it'll be harder to track down bugs.

With my distribution hat on, it's also the worst of both worlds for security fixes: for each format, SDL_mixer would be vulnerable to CVEs in the internal codec and the external codec.

I'm inclined to have distributions use external codecs, and standalone builds use internal codecs and call it good.

I think that's a good policy.