diff options
-rw-r--r-- | src/xine-engine/load_plugins.c | 31 | ||||
-rw-r--r-- | src/xine-engine/xine_interface.c | 32 |
2 files changed, 31 insertions, 32 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 115eeddbb..472cddf7f 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.95 2002/09/18 22:12:17 guenter Exp $ + * $Id: load_plugins.c,v 1.96 2002/09/19 00:40:02 guenter Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -665,9 +665,19 @@ xine_vo_driver_p xine_open_video_driver (xine_p this_ro, driver = (xine_vo_driver_t*)_load_plugin (this, node->filename, node->info, visual); - if (driver) + if (driver) { + + xine_cfg_entry_t entry; + + /* remember plugin id */ + + if (xine_config_lookup_entry (this_ro, "video.driver", &entry)) { + entry.str_value = node->info->id; + xine_config_update_entry (this_ro, &entry); + } + break; - + } } } @@ -754,8 +764,19 @@ xine_ao_driver_p xine_open_audio_driver (xine_p this_ro, const char *id, } } else { driver = (xine_ao_driver_t*)_load_plugin (this, node->filename, node->info, data); - if (driver) - break; + if (driver) { + + xine_cfg_entry_t entry; + + /* remember plugin id */ + + if (xine_config_lookup_entry (this_ro, "audio.driver", &entry)) { + entry.str_value = node->info->id; + xine_config_update_entry (this_ro, &entry); + } + + break; + } } node = xine_list_next_content (this->plugin_catalog->aout); diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 96a2eb805..e9ae6a202 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_interface.c,v 1.17 2002/09/19 00:21:44 guenter Exp $ + * $Id: xine_interface.c,v 1.18 2002/09/19 00:40:02 guenter Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -170,34 +170,12 @@ static int xine_config_get_current_entry (xine_p this, if (!config->cur) return 0; -/* Don't do strdup on const key, help, description */ + entry->key = config->cur->key; entry->type = config->cur->type; - if(entry->unknown_value) { - free(entry->unknown_value); - entry->unknown_value=NULL; - } - if(config->cur->unknown_value) - entry->unknown_value = strdup(config->cur->unknown_value); - - if(entry->str_value) { - free(entry->str_value); - entry->str_value=NULL; - } - if(config->cur->str_value) - entry->str_value = strdup(config->cur->str_value); - if(entry->str_default) { - free(entry->str_default); - entry->str_default=NULL; - } - if(config->cur->str_default) - entry->str_default = strdup(config->cur->str_default); - if(entry->str_sticky) { - free(entry->str_sticky); - entry->str_sticky=NULL; - } - if(config->cur->str_sticky) - entry->str_sticky = strdup(config->cur->str_sticky); + entry->str_value = config->cur->str_value; + entry->str_default = config->cur->str_default; + entry->str_sticky = config->cur->str_sticky; entry->num_value = config->cur->num_value; entry->num_default = config->cur->num_default; entry->range_min = config->cur->range_min; |