1
0
Fork 0
forked from len0rd/rockbox

More codec loader corrections.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6695 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2005-06-12 18:37:18 +00:00
parent e0037adfae
commit 7eb743e881

View file

@ -378,14 +378,10 @@ int codec_load_file(const char *plugin, void *parameter)
return fd; return fd;
} }
plugin_size = 0; rc = read(fd, &pluginbuf[0], PLUGIN_BUFFER_SIZE);
if (rc <= 0)
do { return PLUGIN_ERROR;
rc = read(fd, &pluginbuf[0], PLUGIN_BUFFER_SIZE); plugin_size = rc;
if (rc < 0)
return PLUGIN_ERROR;
plugin_size += rc;
} while (rc > 0) ;
close(fd); close(fd);
return codec_load_ram(pluginbuf, plugin_size, parameter, NULL, 0); return codec_load_ram(pluginbuf, plugin_size, parameter, NULL, 0);