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().
This commit is contained in:
parent
e6cb939a82
commit
24d4c2df92
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user