summaryrefslogtreecommitdiff
path: root/legacy/emotion
diff options
context:
space:
mode:
authordoursse <doursse>2007-11-02 11:58:59 +0000
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2007-11-02 11:58:59 +0000
commit48df189aa7c408ac15f5c0926eb2902c01f60db2 (patch)
tree1838c19afeaf2806b0df8d8e3c490944894be0f4 /legacy/emotion
parent16dadb4847d864b4f8be548a5049c636e83346c9 (diff)
now you can play several files without segfault
SVN revision: 32299
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 442d0da8c6..62fd288920 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -85,17 +85,18 @@ static void _smart_clip_unset(Evas_Object * obj);
85/* Globals for the E Video Object */ 85/* Globals for the E Video Object */
86/**********************************/ 86/**********************************/
87static Evas_Smart *smart = NULL; 87static Evas_Smart *smart = NULL;
88static group_id = -1;
88 89
89static unsigned char 90static unsigned char
90_emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **mod, void **video) 91_emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **mod, void **video)
91{ 92{
92 Ecore_Plugin *plugin; 93 Ecore_Plugin *plugin;
93 int group_id;
94 char *tmp = NULL; 94 char *tmp = NULL;
95 Smart_Data *sd; 95 Smart_Data *sd;
96 96
97 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 97 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
98 group_id = ecore_path_group_new("emotion_module"); 98 if (group_id < 0)
99 group_id = ecore_path_group_new("emotion_module");
99 tmp = getenv("EMOTION_MODULES_DIR"); 100 tmp = getenv("EMOTION_MODULES_DIR");
100 if (tmp) 101 if (tmp)
101 ecore_path_group_add(group_id, tmp); 102 ecore_path_group_add(group_id, tmp);
@@ -123,7 +124,9 @@ _emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **
123 else 124 else
124 printf ("Unable to load module %s\n", name); 125 printf ("Unable to load module %s\n", name);
125 126
126 ecore_path_group_del(group_id); 127 if (group_id > 0)
128 ecore_path_group_del(group_id);
129
127 return 0; 130 return 0;
128} 131}
129 132
@@ -143,8 +146,8 @@ _emotion_module_close(Emotion_Video_Module *mod, void *video)
143 */ 146 */
144 /* 147 /*
145 ecore_plugin_unload(plugin); 148 ecore_plugin_unload(plugin);
146 ecore_path_group_del(group_id);
147 */ 149 */
150 ecore_path_group_del(group_id);
148} 151}
149 152
150/*******************************/ 153/*******************************/