[vlc-commits] oldrc: use make_URI() when adding files

Pierre Ynard git at videolan.org
Thu Jan 27 17:57:48 CET 2011


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Jan 27 17:57:27 2011 +0100| [ed37a76fc34f4954eb93b191b8004da5ab2f122a] | committer: Pierre Ynard

oldrc: use make_URI() when adding files

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

 modules/control/rc.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index d824f50..9957597 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -2092,7 +2092,15 @@ static input_item_t *parse_MRL( intf_thread_t *p_intf, char *psz_mrl )
         if( *psz_item == '\'' && psz_item[strlen(psz_item)-1] == '\'' )
         { psz_item++; psz_item[strlen(psz_item)-1] = 0; }
 
-        if( !psz_item_mrl ) psz_item_mrl = psz_item;
+        if( !psz_item_mrl )
+        {
+            psz_item_mrl = make_URI( psz_item, NULL );
+            if( !psz_item_mrl )
+            {
+                free( psz_orig );
+                return NULL;
+            }
+        }
         else if( *psz_item )
         {
             i_options++;
@@ -2111,6 +2119,7 @@ static input_item_t *parse_MRL( intf_thread_t *p_intf, char *psz_mrl )
         {
             input_item_AddOption( p_item, ppsz_options[i], VLC_INPUT_OPTION_TRUSTED );
         }
+        free( psz_item_mrl );
     }
 
     if( i_options ) free( ppsz_options );



More information about the vlc-commits mailing list