summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-23 17:03:04 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-23 17:03:04 +0100
commitbc8c21fd7f45233fe6501e4e9a21b33a0c498248 (patch)
tree6ac4b724f5bb944a9453d5d7d12f03b28ee8bbf3
parent763595a925b6a5f75e9821654f28e28683cf5960 (diff)
downloadxine-lib-bc8c21fd7f45233fe6501e4e9a21b33a0c498248.tar.gz
xine-lib-bc8c21fd7f45233fe6501e4e9a21b33a0c498248.tar.bz2
Make supported_types constant, change plugins' loading code so that it actually load them properly.
-rw-r--r--include/xine/xine_plugin.h2
-rw-r--r--src/xine-engine/load_plugins.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/include/xine/xine_plugin.h b/include/xine/xine_plugin.h
index 74e7523e9..11ccc5e11 100644
--- a/include/xine/xine_plugin.h
+++ b/include/xine/xine_plugin.h
@@ -70,7 +70,7 @@ typedef struct {
/* special_info for a decoder plugin */
typedef struct {
- uint32_t *supported_types; /* streamtypes this decoder can handle */
+ const uint32_t *supported_types; /* streamtypes this decoder can handle */
int priority;
} decoder_info_t;
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 7a6237b79..f641281d8 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -1022,15 +1022,16 @@ static void load_plugin_list(FILE *fp, xine_sarray_t *plugins) {
vo_info->visual_type = i;
} else if( !strcmp("supported_types",line) && decoder_info ) {
char *s;
+ uint32_t *supported_types;
for( s = value, i = 0; s && sscanf(s," %lu",&lu) > 0; i++ ) {
s = strchr(s+1, ' ');
}
- decoder_info->supported_types = xine_xcalloc((i+1), sizeof(uint32_t));
- for( s = value, i = 0; s && sscanf(s," %lu",&lu) > 0; i++ ) {
- decoder_info->supported_types[i] = lu;
+ supported_types = xine_xcalloc((i+1), sizeof(uint32_t));
+ for( s = value, i = 0; s && sscanf(s," %"SCNu32,&supported_types[i]) > 0; i++ ) {
s = strchr(s+1, ' ');
}
+ decoder_info->supported_types = supported_types;
} else if( !strcmp("vo_priority",line) && vo_info ) {
sscanf(value," %d",&i);
vo_info->priority = i;