aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-24 19:15:48 +0100
committerMax Kellermann <max@duempel.org>2009-01-24 19:15:48 +0100
commit24d4c2df92ed481a398c7a1fa224603fbd621161 (patch)
treece657bde9c6b48f59694508f92b613eb44b02e7f
parente6cb939a82d8559c338ce4cc824c55f4d58499e1 (diff)
downloadmpd-24d4c2df92ed481a398c7a1fa224603fbd621161.tar.gz
mpd-24d4c2df92ed481a398c7a1fa224603fbd621161.tar.xz
mpd-24d4c2df92ed481a398c7a1fa224603fbd621161.zip
modplug: use only decoder_read(), not input_stream_read()
You are allowed to call decoder_read() with decoder==NULL. It is a convenience function provided by the decoder API. Don't manually fall back to input_stream_read().
Diffstat (limited to '')
-rw-r--r--src/decoder/modplug_plugin.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/decoder/modplug_plugin.c b/src/decoder/modplug_plugin.c
index f21f4e7a7..9da92226d 100644
--- a/src/decoder/modplug_plugin.c
+++ b/src/decoder/modplug_plugin.c
@@ -48,11 +48,7 @@ static GByteArray *mod_loadfile(struct decoder *decoder, struct input_stream *is
data = g_malloc(MODPLUG_READ_BLOCK);
total_len = 0;
do {
- if (decoder) {
- ret = decoder_read(decoder, is, data, MODPLUG_READ_BLOCK);
- } else {
- ret = input_stream_read(is, data, MODPLUG_READ_BLOCK);
- }
+ ret = decoder_read(decoder, is, data, MODPLUG_READ_BLOCK);
if (ret > 0) {
g_byte_array_append(bdatas, data, ret);
total_len += ret;