diff -ruN mplayerplug-in.orig/Source/plugin-setup.cpp mplayerplug-in/Source/plugin-setup.cpp --- mplayerplug-in.orig/Source/plugin-setup.cpp 2005-11-26 16:07:08.000000000 +0100 +++ mplayerplug-in/Source/plugin-setup.cpp 2006-01-07 22:10:55.000000000 +0100 @@ -1236,6 +1236,16 @@ continue; } + if (strncasecmp(buffer, "mplayer", 7) == 0) { + snprintf(parse, 1000, "%s", strtok(buffer, "=")); + snprintf(parse, 1000, "%s", strtok(NULL, "=\n")); + if (instance->mplayer_binary != NULL) + free(instance->mplayer_binary); + if (strstr(parse, "`") == NULL) // don't allow shell commands + instance->mplayer_binary = strdup(parse); + continue; + } + if (strncasecmp(buffer, "dload-dir", 9) == 0) { snprintf(parse, 1000, "%s", strtok(buffer, "=")); snprintf(parse, 1000, "%s", strtok(NULL, "=\n")); diff -ruN mplayerplug-in.orig/Source/plugin-threads.cpp mplayerplug-in/Source/plugin-threads.cpp --- mplayerplug-in.orig/Source/plugin-threads.cpp 2005-11-30 17:37:02.000000000 +0100 +++ mplayerplug-in/Source/plugin-threads.cpp 2006-01-07 22:09:49.000000000 +0100 @@ -360,8 +360,15 @@ } i = 0; - snprintf(buffer, 1024, "mplayer"); - instance->td->argv[i++] = strdup(buffer); + + if (instance->mplayer_binary) { + snprintf(buffer, 1024, "%s", instance->mplayer_binary); + instance->td->argv[i++] = strdup(buffer); + } else { + snprintf(buffer, 1024, "mplayer"); + instance->td->argv[i++] = strdup(buffer); + } + if (instance->novop == 1) { snprintf(buffer, 1024, "-vop"); instance->td->argv[i++] = strdup(buffer); diff -ruN mplayerplug-in.orig/Source/plugin.cpp mplayerplug-in/Source/plugin.cpp --- mplayerplug-in.orig/Source/plugin.cpp 2005-12-05 21:19:42.000000000 +0100 +++ mplayerplug-in/Source/plugin.cpp 2006-01-07 23:13:25.000000000 +0100 @@ -273,6 +273,7 @@ keep_download = 0; maintain_aspect = 1; download_dir = strdup(getenv("HOME")); + mplayer_binary = NULL; cachesize = 512; output_display = NULL; osdlevel = 0; @@ -548,6 +549,11 @@ download_dir = NULL; } + if (mplayer_binary != NULL) { + free(mplayer_binary); + mplayer_binary = NULL; + } + if (td->list != NULL) { pthread_mutex_lock(&playlist_mutex); deleteList(td->list); diff -ruN mplayerplug-in.orig/Source/plugin.h mplayerplug-in/Source/plugin.h --- mplayerplug-in.orig/Source/plugin.h 2005-11-30 17:37:02.000000000 +0100 +++ mplayerplug-in/Source/plugin.h 2006-01-07 22:08:01.000000000 +0100 @@ -347,6 +347,7 @@ int maintain_aspect; int qt_speed; char *download_dir; + char *mplayer_binary; int cachesize; char *output_display; int osdlevel; diff -ruN mplayerplug-in.orig/mplayerplug-in.conf mplayerplug-in/mplayerplug-in.conf --- mplayerplug-in.orig/mplayerplug-in.conf 2005-08-18 02:05:20.000000000 +0200 +++ mplayerplug-in/mplayerplug-in.conf 2006-01-07 22:14:15.000000000 +0100 @@ -18,3 +18,4 @@ #mc=1 #black-background=0 #user-agent=NSPlayer +#mplayer=mplayer-bin