Skip to content

audcore: Consider all input plugins for MIME type probing. Closes: #1834 - #1886

Merged
radioactiveman merged 1 commit into
audacious-media-player:masterfrom
radioactiveman:master
Oct 10, 2026
Merged

radioactiveman merged 1 commit into
audacious-media-player:masterfrom
radioactiveman:master

Conversation

@radioactiveman

@radioactiveman radioactiveman commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Radio streams like for example http://hirschmilch.de:7000/chillout.aac
actually serve MP3 content with the header "Content-Type: audio/mpeg"
which is not supported by the extension-matched AAC and FFmpeg plugin.

Always checking all plugins here allows Audacious to play such streams
with misleading extensions, in the example above by using MPG123.

@jlindgren90

Copy link
Copy Markdown
Member

It seems like an oddly specific case, and the code works almost by luck, because two plugins (aac and ffaudio) support the .aac extension. If you have one of those disabled/not installed, then the code enters the if (ext_matches.len() == 1) case and never checks the MIME-type.

If you are set on making this one specific case work, without a general solution, I think I would do simply:

     if (mime)
     {
-        for (PluginHandle * plugin : (ext_matches.len() ? ext_matches : list))
+        for (PluginHandle * plugin : list)
         {

If you want to make the "file/stream has the wrong extension" case work generally, then you need to refactor aud_file_find_decoder to open the input file and probe it with is_our_file even if there is only one extension match; then fall back to trying other plugins if the obvious match rejects it.

…dacious-media-player#1834

Radio streams like for example http://hirschmilch.de:7000/chillout.aac
actually serve MP3 content with the header "Content-Type: audio/mpeg"
which is not supported by the extension-matched AAC and FFmpeg plugin.

Always checking all plugins here allows Audacious to play such streams
with misleading extensions, in the example above by using MPG123.
@radioactiveman radioactiveman changed the title audcore: Accept radio streams with misleading extension. Closes: #1834 audcore: Consider all input plugins for MIME type probing. Closes: #1834 Oct 10, 2026
@radioactiveman
radioactiveman merged commit 8e24563 into audacious-media-player:master Oct 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants