* Try decoding a stream, using the fallback plugin. */
| 249 | * Try decoding a stream, using the fallback plugin. |
| 250 | */ |
| 251 | static DecodeResult |
| 252 | decoder_run_stream_fallback(DecoderBridge &bridge, InputStream &is, |
| 253 | std::unique_lock<Mutex> &lock) |
| 254 | { |
| 255 | const struct DecoderPlugin *plugin; |
| 256 | |
| 257 | #ifdef ENABLE_FFMPEG |
| 258 | plugin = decoder_plugin_from_name("ffmpeg"); |
| 259 | #else |
| 260 | plugin = decoder_plugin_from_name("mad"); |
| 261 | #endif |
| 262 | if (plugin == nullptr) |
| 263 | return DecodeResult::NO_PLUGIN; |
| 264 | |
| 265 | if (plugin->stream_decode == nullptr) |
| 266 | return DecodeResult::NO_STREAM_PLUGIN; |
| 267 | |
| 268 | return decoder_stream_decode(*plugin, bridge, is, lock); |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * Attempt to load replay gain data, and pass it to |
no test coverage detected