diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-09-09 16:17:21 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-09-09 16:17:21 +0000 |
commit | 0d4585b28ffcac1b62ed37cee2c34de0515df468 (patch) | |
tree | 70ace8b78a4d0a44da50d692e893fadd93f85878 /apps/codecs.c | |
parent | cec7c99613b3c11deb8a05deecd7ee9d16b5ea8a (diff) | |
download | rockbox-0d4585b28ffcac1b62ed37cee2c34de0515df468.tar.gz rockbox-0d4585b28ffcac1b62ed37cee2c34de0515df468.zip |
Extend lc_open() to also being able to load overlay plugins.
For this it needs to look at the plugin header. Since lc_open() doesn't know
it's a plugin, the header needs to be changed slightly to include the new lc_header (which needs to be the first element in plugin_header so it can be casted savely).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28054 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs.c')
-rw-r--r-- | apps/codecs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/codecs.c b/apps/codecs.c index 35f6363986..3fa05be59a 100644 --- a/apps/codecs.c +++ b/apps/codecs.c | |||
@@ -181,7 +181,8 @@ void codec_get_full_path(char *path, const char *codec_root_fn) | |||
181 | 181 | ||
182 | static int codec_load_ram(void *handle, struct codec_api *api) | 182 | static int codec_load_ram(void *handle, struct codec_api *api) |
183 | { | 183 | { |
184 | struct codec_header *hdr = lc_get_header(handle); | 184 | struct codec_header *c_hdr = lc_get_header(handle); |
185 | struct lc_header *hdr = c_hdr ? &c_hdr->lc_hdr : NULL; | ||
185 | int status; | 186 | int status; |
186 | 187 | ||
187 | if (hdr == NULL | 188 | if (hdr == NULL |
@@ -215,8 +216,8 @@ static int codec_load_ram(void *handle, struct codec_api *api) | |||
215 | codec_size = 0; | 216 | codec_size = 0; |
216 | #endif | 217 | #endif |
217 | 218 | ||
218 | *(hdr->api) = api; | 219 | *(c_hdr->api) = api; |
219 | status = hdr->entry_point(); | 220 | status = c_hdr->entry_point(); |
220 | 221 | ||
221 | lc_close(handle); | 222 | lc_close(handle); |
222 | 223 | ||