[vlc-devel] commit: Gives the correct arguments to libvlc_new() ( Rafaël Carré )
git version control
git at videolan.org
Fri May 16 13:29:37 CEST 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri May 16 13:30:48 2008 +0200| [d6b76f6d3e53c4ef21e503f2cd0b5b8bcdd31aed]
Gives the correct arguments to libvlc_new()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d6b76f6d3e53c4ef21e503f2cd0b5b8bcdd31aed
---
src/vlc.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/vlc.c b/src/vlc.c
index deaba4b..c84e7f1 100644
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -184,7 +184,10 @@ int main( int i_argc, const char *ppsz_argv[] )
libvlc_exception_init (&ex);
/* Initialize libvlc */
- libvlc_instance_t *vlc = libvlc_new (i_argc, ppsz_argv, &ex);
+ int i_argc_real = i_argc ? i_argc - 1 : 0;
+ const char **ppsz_argv_real = i_argc ? &ppsz_argv[1] : ppsz_argv;
+ libvlc_instance_t *vlc = libvlc_new (i_argc_real, ppsz_argv_real, &ex);
+
if (vlc != NULL)
{
libvlc_run_interface (vlc, NULL, &ex);
More information about the vlc-devel
mailing list