decoder/list: probe "ffmpeg" before "sndfile" and "audiofile"

For FFmpeg's DTS-WAV support, see code comment.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/2158
This commit is contained in:
Max Kellermann
2025-01-29 15:35:53 +01:00
parent c0a9434f34
commit 8fcb6e148f
2 changed files with 15 additions and 6 deletions

2
NEWS
View File

@@ -5,6 +5,8 @@ ver 0.23.17 (not yet released)
- nfs: require libnfs 4.0 or later
* database
- inotify: trigger update after symlink was created
* decoder
- ffmpeg: prefer over sndfile and audiofile for its DTS-WAV support
* support libfmt 11.1
ver 0.23.16 (2024/12/03)

View File

@@ -73,12 +73,6 @@ constexpr const struct DecoderPlugin *decoder_plugins[] = {
#ifdef ENABLE_OPUS
&opus_decoder_plugin,
#endif
#ifdef ENABLE_SNDFILE
&sndfile_decoder_plugin,
#endif
#ifdef ENABLE_AUDIOFILE
&audiofile_decoder_plugin,
#endif
#ifdef ENABLE_DSD
&dsdiff_decoder_plugin,
&dsf_decoder_plugin,
@@ -120,6 +114,19 @@ constexpr const struct DecoderPlugin *decoder_plugins[] = {
#ifdef ENABLE_FFMPEG
&ffmpeg_decoder_plugin,
#endif
/* these WAV-decoding plugins are below ffmpeg_decoder_plugin
to give FFmpeg a chance to decode DTS-WAV files which is
technically DTS Coherent Acoustics (DCA) stream wrapped in
fake 16-bit stereo samples; neither libsndfile nor
libaudiofile detect this, but FFmpeg does */
#ifdef ENABLE_SNDFILE
&sndfile_decoder_plugin,
#endif
#ifdef ENABLE_AUDIOFILE
&audiofile_decoder_plugin,
#endif
&pcm_decoder_plugin,
nullptr
};