play command fix by ILEoo (see [18938]).
[vlc.git] / src / input / vlm.c
index d729ac6..17c3870 100644 (file)
@@ -2500,7 +2500,7 @@ static int Manage( vlc_object_t* p_object )
                 {
                     /* FIXME, find a way to select the right instance */
                     char buffer[12];
                 {
                     /* FIXME, find a way to select the right instance */
                     char buffer[12];
-                    sprintf( buffer, "%d", p_instance->i_index );
+                    sprintf( buffer, "%d", p_instance->i_index+1 );
                     vlm_MediaControl( vlm, p_media, p_instance->psz_name,
                                       "play", buffer );
                 }
                     vlm_MediaControl( vlm, p_media, p_instance->psz_name,
                                       "play", buffer );
                 }
@@ -2509,8 +2509,8 @@ static int Manage( vlc_object_t* p_object )
                     if( vlm_MediaControl( vlm, p_media, p_instance->psz_name,
                                           "stop", 0 ) == VLC_SUCCESS )
                     {
                     if( vlm_MediaControl( vlm, p_media, p_instance->psz_name,
                                           "stop", 0 ) == VLC_SUCCESS )
                     {
-                        j--; /* the aray is one element smaller now. */
-                   }
+                         j--; /* the aray is one element smaller now. */
+                    }
                 }
             }
         }
                 }
             }
         }