rem: plugin->href = g_strdup (argv[i]);
add: plugin->href = resolve_relative_uri (docURI, argv[i]);
context: static NPError totem_plugin_new_instance (NPMIMEType mime_type, NPP instance,		uint16_t mode, int16_t argc, char *argn[], char *argv[],		NPSavedData *saved){	TotemPlugin *plugin;	int i;	DEBUG("totem_plugin_new_instance");	if (instance == NULL)		return NPERR_INVALID_INSTANCE_ERROR;	instance->pdata = mozilla_functions.memalloc(sizeof(TotemPlugin));	plugin = (TotemPlugin *) instance->pdata;	if (plugin == NULL)		return NPERR_OUT_OF_MEMORY_ERROR;	memset(plugin, 0, sizeof(TotemPlugin));	plugin->iface = new totemMozillaObject (plugin);	if (!plugin->iface) {		mozilla_functions.memfree (plugin);		return NPERR_OUT_OF_MEMORY_ERROR;	}	plugin->conn = bacon_message_connection_new ("totem-mozilla");	if (!plugin->conn) {		delete plugin->iface;		mozilla_functions.memfree (plugin);		return NPERR_OUT_OF_MEMORY_ERROR;	}	bacon_message_connection_set_callback (plugin->conn, cb_data, plugin);	//NS_ADDREF (plugin->iface);	/* mode is NP_EMBED, NP_FULL, or NP_BACKGROUND (see npapi.h) */	printf("mode %d\n",mode);	//printf("mime type: %s\n",pluginType);	plugin->instance = instance;	plugin->send_fd = -1;	for (i=0; i<argc; i++) {		printf ("argv[%d] %s %s\n", i, argn[i], argv[i]);		if (g_ascii_strcasecmp (argn[i],"width") == 0) {			plugin->width = strtol (argv[i], NULL, 0);		}		if (g_ascii_strcasecmp (argn[i], "height") == 0) {			plugin->height = strtol (argv[i], NULL, 0);		}		//FIXME we can have some relative paths here as well!		if (g_ascii_strcasecmp (argn[i], "src") == 0) {			plugin->src = g_strdup (argv[i]);		}		if (g_ascii_strcasecmp (argn[i], "href") == 0) {			plugin->href = g_strdup (argv[i]);		}		if (g_ascii_strcasecmp (argn[i], "controller") == 0) {			if (g_ascii_strcasecmp (argv[i], "false") == 0) {				plugin->controller_hidden = TRUE;			}			//FIXME see http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_CONTROLS.html		}		if (g_ascii_strcasecmp (argn[i], "hidden") == 0) {			//FIXME		}		if (g_ascii_strcasecmp (argn[i], "autostart") == 0				|| g_ascii_strcasecmp (argn[i], "autoplay") == 0) {			//FIXME		}		if (g_ascii_strcasecmp (argn[i], "loop") == 0 ||				g_ascii_strcasecmp (argn[i], "playcount") == 0) {			//FIXME see http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_LOOP.html		}		if (g_ascii_strcasecmp (argn[i], "starttime") == 0) {			//FIXME see http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_STARTTIME.html		}		if (g_ascii_strcasecmp (argn[i], "endtime") == 0) {			//FIXME see above		}	}	return NPERR_NO_ERROR;}