#include <vlc/vlc.h>
#include <stdio.h>
#include <stdlib.h>
-#include <locale.h>
+
+#ifdef HAVE_SETLOCALE
+# include <locale.h>
+#endif
#ifdef HAVE_GETOPT_H
# include <getopt.h>
{ NULL, no_argument, NULL, '\0'}
};
+#ifdef HAVE_SETLOCALE
setlocale (LC_CTYPE, ""); /* needed by FromLocale() */
+#endif
int c;
while ((c = getopt_long (argc, argv, "hV", opts, NULL)) != -1)
const char *const vlc_argv[] = {
"--ignore-config",
"--quiet",
+ "--no-media-library",
arg,
NULL,
};
+ size_t vlc_argc = sizeof (vlc_argv) / sizeof (vlc_argv[0]) - 1;
- libvlc_exception_t ex;
- libvlc_exception_init (&ex);
-
- libvlc_instance_t *vlc = libvlc_new (3, vlc_argv, &ex);
+ libvlc_instance_t *vlc = libvlc_new (vlc_argc, vlc_argv);
if (vlc != NULL)
libvlc_release (vlc);
free (arg);