Changeset a9a5e4830a6b6c2db67eb9db6c3addec74afbf75

Show
Ignore:
Timestamp:
14/07/08 00:00:25 (5 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1215986425 +0200
git-parent:

[1fac4d77a9b862ec150ade10173015a96986c608]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1215986425 +0200
Message:

directory: Don't get stuck if playlist dies. And remove an unused param.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/directory.c

    r3770811 ra9a5e48  
    137137 
    138138static int ReadDir( playlist_t *, const char *psz_name, int i_mode, 
    139                     playlist_item_t *, playlist_item_t *, input_item_t *, 
     139                    playlist_item_t *, input_item_t *, 
    140140                    DIR *handle, stat_list_t *stats ); 
    141141 
     
    257257                                              false ); 
    258258 
    259     ReadDir( p_playlist, psz_name, i_mode, p_current, p_item_in_category, 
     259    ReadDir( p_playlist, psz_name, i_mode, p_item_in_category, 
    260260             p_current_input, (DIR *)p_access->p_sys, NULL ); 
    261261 
     
    366366 *****************************************************************************/ 
    367367static int ReadDir( playlist_t *p_playlist, const char *psz_name, 
    368                     int i_mode, playlist_item_t *p_parent, 
     368                    int i_mode, 
    369369                    playlist_item_t *p_parent_category, 
    370370                    input_item_t *p_current_input, 
     
    374374    int             i_dir_content, i, i_return = VLC_SUCCESS; 
    375375    playlist_item_t *p_node; 
     376 
     377    if( !vlc_object_alive( p_playlist ) ) 
     378        return VLC_SUCCESS; 
    376379 
    377380    char **ppsz_extensions = NULL; 
     
    488491                 * Else, we still don't have  */ 
    489492                i_return = ReadDir( p_playlist, psz_uri , MODE_EXPAND, 
    490                                     p_node, p_parent_category ? p_node : NULL, 
     493                                    p_parent_category ? p_node : NULL, 
    491494                                    p_current_input, subdir, &stself ); 
    492495                closedir (subdir); 
     
    519522                memmove (psz_uri + 7, psz_uri, sizeof (psz_uri) - 7); 
    520523                memcpy (psz_uri, "file://", 7); 
    521                 p_input = input_ItemNewWithType( VLC_OBJECT(p_playlist)
     524                p_input = input_ItemNewWithType( p_playlist
    522525                                                 psz_uri, entry, 0, NULL, 
    523526                                                 -1, ITEM_TYPE_FILE ); 
     527                msg_Dbg( p_playlist, "dir: created %s", p_input->psz_name ); 
    524528                if (p_input != NULL) 
    525529                { 
     
    532536                                           PLAYLIST_END, NULL, NULL, 
    533537                                           false ); 
     538                    msg_Dbg( p_playlist, "dir: Deleting %s", p_input->psz_name ); 
    534539                    vlc_gc_decref( p_input ); 
    535540                    if( i_ret != VLC_SUCCESS )