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:
parent
e0037adfae
commit
7eb743e881
1 changed files with 4 additions and 8 deletions
|
|
@ -378,14 +378,10 @@ int codec_load_file(const char *plugin, void *parameter)
|
|||
return fd;
|
||||
}
|
||||
|
||||
plugin_size = 0;
|
||||
|
||||
do {
|
||||
rc = read(fd, &pluginbuf[0], PLUGIN_BUFFER_SIZE);
|
||||
if (rc < 0)
|
||||
if (rc <= 0)
|
||||
return PLUGIN_ERROR;
|
||||
plugin_size += rc;
|
||||
} while (rc > 0) ;
|
||||
plugin_size = rc;
|
||||
close(fd);
|
||||
|
||||
return codec_load_ram(pluginbuf, plugin_size, parameter, NULL, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue