[MPlayer-cvslog] r29768 - trunk/playtree.c

adrian subversion at mplayerhq.hu
Sat Oct 10 12:39:05 CEST 2009


Author: adrian
Date: Sat Oct 10 12:39:05 2009
New Revision: 29768

Log:
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).

Modified:
   trunk/playtree.c

Modified: trunk/playtree.c
==============================================================================
--- trunk/playtree.c	Sat Oct 10 11:27:22 2009	(r29767)
+++ trunk/playtree.c	Sat Oct 10 12:39:05 2009	(r29768)
@@ -320,25 +320,15 @@ play_tree_remove_file(play_tree_t* pt,ch
 
 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) {


More information about the MPlayer-cvslog mailing list