aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/modplug_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-10 19:01:38 +0100
committerMax Kellermann <max@duempel.org>2009-11-14 00:47:22 +0100
commit719990b1c5db93ccdc21e5f91e98ed9e8540ade1 (patch)
treeef03f58f54767b73c4c8d267e7b0008938863a17 /src/decoder/modplug_plugin.c
parentf47bb8c1db91b50be95c4d5dd301728e38c57274 (diff)
downloadmpd-719990b1c5db93ccdc21e5f91e98ed9e8540ade1.tar.gz
mpd-719990b1c5db93ccdc21e5f91e98ed9e8540ade1.tar.xz
mpd-719990b1c5db93ccdc21e5f91e98ed9e8540ade1.zip
decoder: use audio_format_init_checked()
Let the audio_check library verify the audio format in all (relevant, i.e. non-hardcoded) plugins.
Diffstat (limited to 'src/decoder/modplug_plugin.c')
-rw-r--r--src/decoder/modplug_plugin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/decoder/modplug_plugin.c b/src/decoder/modplug_plugin.c
index 7781511b6..1d373a466 100644
--- a/src/decoder/modplug_plugin.c
+++ b/src/decoder/modplug_plugin.c
@@ -22,6 +22,7 @@
#include <glib.h>
#include <modplug.h>
+#include <assert.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "modplug"
@@ -123,6 +124,7 @@ mod_decode(struct decoder *decoder, struct input_stream *is)
}
audio_format_init(&audio_format, 44100, 16, 2);
+ assert(audio_format_valid(&audio_format));
sec_perbyte =
1.0 / ((audio_format.bits * audio_format.channels / 8.0) *