diff playtree.c @ 29726:0d05687720a9

Remove redundant duplicate option handling in the playtree. Fixes the use of options on the command line which should not override each other (like -vf-add).
author adrian
date Sat, 10 Oct 2009 10:39:05 +0000
parents 0f1b5b68af32
children c1a3f1bbba26
line wrap: on
line diff
--- a/playtree.c	Sat Oct 10 09:27:22 2009 +0000
+++ b/playtree.c	Sat Oct 10 10:39:05 2009 +0000
@@ -320,25 +320,15 @@
 
 void
 play_tree_set_param(play_tree_t* pt, char* name, char* val) {
-  int n = 0,ni = -1;
+  int n = 0;
 
 #ifdef MP_DEBUG
   assert(pt != NULL);
   assert(name != NULL);
 #endif
 
-  if(pt->params) {
-    for( ; pt->params[n].name != NULL ; n++) {
-      if(strcasecmp(pt->params[n].name,name) == 0)
-	ni = n;
-    }
-  }
-
-  if(ni > 0) {
-    if(pt->params[n].value != NULL) free(pt->params[n].value);
-    pt->params[n].value = val != NULL ? strdup(val) : NULL;
-    return;
-  }
+  if(pt->params)
+    for ( ; pt->params[n].name != NULL ; n++ ) { }
 
   pt->params = (play_tree_param_t*)realloc(pt->params,(n+2)*sizeof(play_tree_param_t));
   if(pt->params == NULL) {