From 8ce89e1a9219727a79535fdf17d78ff1e77de5b8 Mon Sep 17 00:00:00 2001 From: Damien Fouilleul Date: Tue, 26 Sep 2006 14:40:55 +0000 Subject: [PATCH] - revert 16847, this breaks the activex and mozilla plugins, and passing a argv[0] is a very desirable feature as the path in argv[0] is also used to search for plugins. Typically users can pass on the argv[0] of their programs --- src/control/core.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/control/core.c b/src/control/core.c index dbe8b4481d..ddfa6adc5e 100644 --- a/src/control/core.c +++ b/src/control/core.c @@ -95,18 +95,7 @@ libvlc_instance_t * libvlc_new( int argc, char **argv, /** \todo Look for interface settings. If we don't have any, add -I dummy */ /* Because we probably don't want a GUI by default */ - /* Prepend a dummy argv[0] so that users of the libvlc API do not have to - do it themselves, and can simply provide the args list. */ - ppsz_argv = malloc( ( argc + 2 ) * sizeof( char * ) ) ; - if( ! ppsz_argv ) - RAISENULL( "Out of memory" ); - - ppsz_argv[0] = strdup("vlc"); - for ( i_index = 0; i_index < argc; i_index++ ) - ppsz_argv[i_index + 1] = argv[i_index]; - ppsz_argv[argc + 1] = NULL; - - if( libvlc_InternalInit( p_libvlc_int, argc + 1, ppsz_argv ) ) + if( libvlc_InternalInit( p_libvlc_int, argc, ppsz_argv ) ) RAISENULL( "VLC initialization failed" ); p_new->p_libvlc_int = p_libvlc_int; -- 2.39.2