From 510a5f268cf0a10f3b70800af781c96205f668a1 Mon Sep 17 00:00:00 2001 From: adrian Date: Sat, 10 Oct 2009 10:39:05 +0000 Subject: [PATCH] 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). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29768 b3059339-0415-0410-9bf9-f77b7e298cf2 --- playtree.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/playtree.c b/playtree.c index 06d4c49759..4a017be425 100644 --- a/playtree.c +++ b/playtree.c @@ -320,25 +320,15 @@ play_tree_remove_file(play_tree_t* pt,char* file) { 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) {