now you can play several files without segfault

SVN revision: 32299
This commit is contained in:
doursse 2007-11-02 11:58:59 +00:00 committed by doursse
parent 16dadb4847
commit 48df189aa7
1 changed files with 7 additions and 4 deletions

View File

@ -85,17 +85,18 @@ static void _smart_clip_unset(Evas_Object * obj);
/* Globals for the E Video Object */ /* Globals for the E Video Object */
/**********************************/ /**********************************/
static Evas_Smart *smart = NULL; static Evas_Smart *smart = NULL;
static group_id = -1;
static unsigned char static unsigned char
_emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **mod, void **video) _emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **mod, void **video)
{ {
Ecore_Plugin *plugin; Ecore_Plugin *plugin;
int group_id;
char *tmp = NULL; char *tmp = NULL;
Smart_Data *sd; Smart_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
group_id = ecore_path_group_new("emotion_module"); if (group_id < 0)
group_id = ecore_path_group_new("emotion_module");
tmp = getenv("EMOTION_MODULES_DIR"); tmp = getenv("EMOTION_MODULES_DIR");
if (tmp) if (tmp)
ecore_path_group_add(group_id, tmp); ecore_path_group_add(group_id, tmp);
@ -123,7 +124,9 @@ _emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **
else else
printf ("Unable to load module %s\n", name); printf ("Unable to load module %s\n", name);
ecore_path_group_del(group_id); if (group_id > 0)
ecore_path_group_del(group_id);
return 0; return 0;
} }
@ -143,8 +146,8 @@ _emotion_module_close(Emotion_Video_Module *mod, void *video)
*/ */
/* /*
ecore_plugin_unload(plugin); ecore_plugin_unload(plugin);
ecore_path_group_del(group_id);
*/ */
ecore_path_group_del(group_id);
} }
/*******************************/ /*******************************/