]> git.sesse.net Git - vlc/blobdiff - src/input/vlmshell.c
Don't reset master program clock if master program was not selected
[vlc] / src / input / vlmshell.c
index afa7ed2be60be8a2dae7aac63c9a20cf3f18d262..2573f81d2b9046a5473326cc3fb777a0f6bff8c2 100644 (file)
@@ -525,7 +525,7 @@ error:
 
 static int ExecuteLoad( vlm_t *p_vlm, const char *psz_path, vlm_message_t **pp_status )
 {
-    char *psz_url = make_URI( psz_path, NULL );
+    char *psz_url = vlc_path2uri( psz_path, NULL );
     stream_t *p_stream = stream_UrlNew( p_vlm, psz_url );
     free( psz_url );
     uint64_t i_size;
@@ -702,13 +702,11 @@ static int ExecuteMediaProperty( vlm_t *p_vlm, int64_t id, bool b_new,
         }
         else if( !strcmp( psz_option, "inputdeln" ) )
         {
-            int i_index;
-
             MISSING( "inputdeln" );
  
-            i_index = atoi( psz_value );
-            if( i_index > 0 && i_index <= p_cfg->i_input )
-                TAB_REMOVE( p_cfg->i_input, p_cfg->ppsz_input, p_cfg->ppsz_input[i_index-1] );
+            int idx = atoi( psz_value );
+            if( idx > 0 && idx <= p_cfg->i_input )
+                TAB_REMOVE( p_cfg->i_input, p_cfg->ppsz_input, p_cfg->ppsz_input[idx-1] );
             i++;
         }
         else if( !strcmp( psz_option, "output" ) )
@@ -856,7 +854,7 @@ int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
 
     if( !psz_buf || !ppsz_command )
     {
-        p_message = vlm_MessageNew( ppsz_command[0],
+        p_message = vlm_MessageNew( ( ppsz_command ) ? ppsz_command[0] : NULL,
                         "Memory allocation failed for command of length %zu",
                         i_command_len );
         goto error;