[vlc-commits] Don't pass input options when using --one-instance

Pierre Ynard git at videolan.org
Fri Jan 28 02:47:04 CET 2011


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Fri Jan 28 02:45:46 2011 +0100| [1c7048c53dea7abecb2dc7b50855cdbfe6b5bcd8] | committer: Pierre Ynard

Don't pass input options when using --one-instance

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c7048c53dea7abecb2dc7b50855cdbfe6b5bcd8
---

 src/libvlc.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index 3647d4d..1b37af5 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -564,6 +564,14 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 
                 for( i_input = vlc_optind; i_input < i_argc;i_input++ )
                 {
+                    /* Skip input options, we can't pass them through D-Bus */
+                    if( ppsz_argv[i_input][0] == ':' )
+                    {
+                        msg_Warn( p_libvlc, "Ignoring option %s",
+                                  ppsz_argv[i_input] );
+                        continue;
+                    }
+
                     /* We need to resolve relative paths in this instance */
                     char *psz_mrl = make_URI( ppsz_argv[i_input], NULL );
                     if( psz_mrl == NULL )



More information about the vlc-commits mailing list