]> granicus.if.org Git - handbrake/commitdiff
Remove VLC Loading code from the CLI.
authorsr55 <sr55.hb@outlook.com>
Sat, 9 Mar 2013 22:23:20 +0000 (22:23 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 9 Mar 2013 22:23:20 +0000 (22:23 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5317 b64f7644-9d1e-0410-96f1-a4d463321fa5

test/test.c

index 54f704f786af54acd5aaa798aa8c3523c9751c76..d2736e129341fef8ffba4288aa7822e5ab15e98e 100644 (file)
 #endif
 
 /* Options */
-#if defined( __APPLE_CC__ )
-#define EXTRA_VLC_DYLD_PATH "/Applications/VLC.app/Contents/MacOS/lib"
-#define DEFAULT_DYLD_PATH "/usr/local/lib:/usr/lib"
-
-static int    no_vlc_dylib = 0;
-#endif
 static int    debug       = HB_DEBUG_ALL;
 static int    update      = 0;
 static int    dvdnav      = 1;
@@ -3548,9 +3542,6 @@ static int ParseOptions( int argc, char ** argv )
             { "vfr",         no_argument,       &cfr,    0 },
             { "cfr",         no_argument,       &cfr,    1 },
             { "pfr",         no_argument,       &cfr,    2 },
-#if defined( __APPLE_CC__ )
-            { "no-vlc-dylib-path", no_argument, &no_vlc_dylib,    1 },
-#endif
             { "audio-copy-mask", required_argument, NULL, ALLOWED_AUDIO_COPY },
             { "audio-fallback",  required_argument, NULL, AUDIO_FALLBACK },
             { 0, 0, 0, 0 }
@@ -4106,72 +4097,6 @@ static int ParseOptions( int argc, char ** argv )
 
 static int CheckOptions( int argc, char ** argv )
 {
-#if defined( __APPLE_CC__ )
-    // If OSX, add VLC dylib path and exec to make it stick.
-    char *dylib_path;
-
-    if ( !no_vlc_dylib )
-    {
-        dylib_path = getenv("DYLD_FALLBACK_LIBRARY_PATH");
-        if ( dylib_path == NULL ||
-             strstr( dylib_path, "/Applications/VLC.app/Contents/MacOS/lib" ) == NULL )
-        {
-            char *path = NULL;
-            char *home;
-            int result = -1;
-
-            home = getenv("HOME");
-
-            if ( dylib_path == NULL )
-            {
-                // Set the system default of $HOME/lib:/usr/local/lib:/usr/lib
-                // And add our extra path
-                if ( home != NULL )
-                {
-                    path = hb_strdup_printf("%s/lib:%s:%s:%s%s", home, 
-                                      DEFAULT_DYLD_PATH, 
-                                      EXTRA_VLC_DYLD_PATH, 
-                                      home, EXTRA_VLC_DYLD_PATH);
-                }
-                else
-                {
-                    path = hb_strdup_printf("%s:%s", DEFAULT_DYLD_PATH, EXTRA_VLC_DYLD_PATH);
-                }
-                if ( path != NULL )
-                    result = setenv("DYLD_FALLBACK_LIBRARY_PATH", path, 1);
-            }
-            else
-            {
-                // add our extra path
-                if ( home != NULL )
-                {
-                    path = hb_strdup_printf("%s:%s:%s%s", dylib_path, EXTRA_VLC_DYLD_PATH,
-                                                        home, EXTRA_VLC_DYLD_PATH);
-                }
-                else
-                {
-                    path = hb_strdup_printf("%s:%s", dylib_path, EXTRA_VLC_DYLD_PATH);
-                }
-                if ( path != NULL )
-                    result = setenv("DYLD_FALLBACK_LIBRARY_PATH", path, 1);
-            }
-            if ( result == 0 )
-            {
-                const char ** new_argv;
-                int i;
-
-                new_argv = (const char**)malloc( (argc + 2) * sizeof(char*) );
-                new_argv[0] = argv[0];
-                new_argv[1] = "--no-vlc-dylib-path";
-                for (i = 1; i < argc; i++)
-                    new_argv[i+1] = argv[i];
-                new_argv[i+1] = NULL;
-                execv(new_argv[0], (char* const*)new_argv);
-            }
-        }
-    }
-#endif
-
     if( update )
     {
         return 0;