]> git.sesse.net Git - vlc/blobdiff - src/modules/entry.c
Remove splice support - it does not quite help for UDP & DCCP
[vlc] / src / modules / entry.c
index ebd0e878de140f9ec6b17b7826b6c6d0fc18182b..63e668fd9b7533a2fa586e61deee7dc7c7ddab1a 100644 (file)
@@ -40,9 +40,10 @@ module_t *vlc_module_create (vlc_object_t *obj)
     if (module == NULL)
         return NULL;
 
-    module->b_reentrant = module->b_unloadable = VLC_TRUE;
-    module->psz_object_name = module->psz_longname = default_name;
-    module->psz_capability = "";
+    module->b_reentrant = module->b_unloadable = true;
+    module->psz_object_name = strdup( default_name );
+    module->psz_longname = default_name;
+    module->psz_capability = (char*)"";
     module->i_score = 1;
     module->i_config_items = module->i_bool_items = 0;
 
@@ -62,13 +63,13 @@ module_t *vlc_submodule_create (module_t *module)
         return NULL;
 
     vlc_object_attach (submodule, module);
-    submodule->b_submodule = VLC_TRUE;
+    submodule->b_submodule = true;
 
     /* Muahahaha! Heritage! Polymorphism! Ugliness!! */
     memcpy (submodule->pp_shortcuts, module->pp_shortcuts,
             sizeof (submodule->pp_shortcuts));
 
-    submodule->psz_object_name = module->psz_object_name;
+    submodule->psz_object_name = strdup( module->psz_object_name );
     submodule->psz_shortname = module->psz_shortname;
     submodule->psz_longname = module->psz_longname;
     submodule->psz_capability = module->psz_capability;
@@ -131,7 +132,9 @@ int vlc_module_set (module_t *module, int propid, void *value)
             break;
 
         case VLC_MODULE_NAME:
-            module->pp_shortcuts[0] = module->psz_object_name = (char *)value;
+            free( module->psz_object_name );
+            module->psz_object_name = strdup( (char *)value );
+            module->pp_shortcuts[0] = (char *)value;
             if (module->psz_longname == default_name)
                 module->psz_longname = (char *)value;
             break;
@@ -256,32 +259,32 @@ int vlc_config_set (module_config_t *restrict item, int id, ...)
         }
 
         case VLC_CONFIG_ADVANCED:
-            item->b_advanced = VLC_TRUE;
+            item->b_advanced = true;
             ret = 0;
             break;
 
         case VLC_CONFIG_VOLATILE:
-            item->b_unsaveable = VLC_TRUE;
+            item->b_unsaveable = true;
             ret = 0;
             break;
 
         case VLC_CONFIG_PERSISTENT:
-            item->b_autosave = VLC_TRUE;
+            item->b_autosave = true;
             ret = 0;
             break;
 
         case VLC_CONFIG_RESTART:
-            item->b_restart = VLC_TRUE;
+            item->b_restart = true;
             ret = 0;
             break;
 
         case VLC_CONFIG_PRIVATE:
-            item->b_internal = VLC_TRUE;
+            item->b_internal = true;
             ret = 0;
             break;
 
         case VLC_CONFIG_REMOVED:
-            item->b_removed = VLC_TRUE;
+            item->b_removed = true;
             ret = 0;
             break;
 
@@ -368,6 +371,7 @@ int vlc_config_set (module_config_t *restrict item, int id, ...)
             }
 
             item->i_list = len;
+            item->pf_update_list = va_arg (ap, vlc_callback_t);
             ret = 0;
             break;
         }
@@ -412,7 +416,7 @@ int vlc_config_set (module_config_t *restrict item, int id, ...)
         }
 
         case VLC_CONFIG_SAFE:
-            item->b_safe = VLC_TRUE;
+            item->b_safe = true;
             ret = 0;
             break;
     }