From c8ec85d649e46df87d1b526fde2d8234428925c0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Aug 2012 00:35:56 +0200 Subject: [PATCH] decoder/fluidsynth: check if file is really a MIDI Use fluid_is_midifile() to verify the file format. --- NEWS | 1 + src/decoder/fluidsynth_decoder_plugin.c | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 2cb2c04c9..0dfa92b60 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.17.2 (2012/??/??) - fix crash in local file check * decoder: - fluidsynth: remove throttle (requires libfluidsynth 1.1) + - fluidsynth: check MIDI file format while scanning * output: - httpd: use monotonic clock, avoid hiccups after system clock adjustment - httpd: fix throttling bug after resuming playback diff --git a/src/decoder/fluidsynth_decoder_plugin.c b/src/decoder/fluidsynth_decoder_plugin.c index 9e2511d3e..8cb524c98 100644 --- a/src/decoder/fluidsynth_decoder_plugin.c +++ b/src/decoder/fluidsynth_decoder_plugin.c @@ -208,10 +208,7 @@ fluidsynth_scan_file(const char *file, G_GNUC_UNUSED const struct tag_handler *handler, G_GNUC_UNUSED void *handler_ctx) { - /* to be implemented */ - (void)file; - - return true; + return fluid_is_midifile(file); } static const char *const fluidsynth_suffixes[] = {