From 24d4c2df92ed481a398c7a1fa224603fbd621161 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 24 Jan 2009 19:15:48 +0100 Subject: 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(). --- src/decoder/modplug_plugin.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') 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; -- cgit v1.2.3