decoder/Thread: use "ffmpeg" as fallback instead of "mad"

Adds support for stream codecs which havn't been explicitly listed in
ffmpeg_mime_types.
This commit is contained in:
Max Kellermann 2016-03-30 00:58:48 +02:00
parent 53677172f2
commit 74dbaade6f
2 changed files with 6 additions and 0 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.19.15 (not yet released)
* decoder
- ffmpeg: use as fallback instead of "mad" if no plugin matches
* fix more build failures on non-glibc builds due to constexpr Mutex
ver 0.19.14 (2016/03/18)

View File

@ -255,7 +255,11 @@ decoder_run_stream_fallback(Decoder &decoder, InputStream &is)
{
const struct DecoderPlugin *plugin;
#ifdef HAVE_FFMPEG
plugin = decoder_plugin_from_name("ffmpeg");
#else
plugin = decoder_plugin_from_name("mad");
#endif
return plugin != nullptr && plugin->stream_decode != nullptr &&
decoder_stream_decode(*plugin, decoder, is);
}