Show
Ignore:
Timestamp:
28/09/08 02:08:39 (2 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1222560519 +0200
git-parent:

[f5292e55aa88b99533607ff1c191f2285d5e0d29]

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

Fix playlist_CurrentInput usage.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/control/dbus.c

    rc205ecf r47fd502  
    168168 
    169169    playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p_this) ); 
    170     PL_LOCK; 
    171170    input_thread_t *p_input = playlist_CurrentInput( p_playlist ); 
    172171 
     
    177176        var_Get( p_input, "time", &position ); 
    178177        i_pos = position.i_time / 1000; 
    179     } 
    180     PL_UNLOCK; 
     178        vlc_object_release( p_input ); 
     179    } 
    181180    pl_Release( ((vlc_object_t*) p_this) ); 
    182181    ADD_INT32( &i_pos ); 
     
    207206    } 
    208207    p_playlist = pl_Hold( ((vlc_object_t*) p_this) ); 
    209     PL_LOCK; 
    210208    input_thread_t *p_input = playlist_CurrentInput( p_playlist ); 
    211209 
     
    214212        position.i_time = i_pos * 1000; 
    215213        var_Set( p_input, "time", position ); 
    216     } 
    217     PL_UNLOCK; 
     214        vlc_object_release( p_input ); 
     215    } 
    218216    pl_Release( ((vlc_object_t*) p_this) ); 
    219217    REPLY_SEND; 
     
    320318    playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this ); 
    321319 
    322     PL_LOCK; 
    323320    input_thread_t *p_input =  playlist_CurrentInput( p_playlist ); 
    324     if( p_input ) 
    325         vlc_object_hold( p_input ); 
    326     PL_UNLOCK; 
    327321 
    328322    if( p_input ) 
     
    797791    input_thread_t  *p_input; 
    798792 
    799     PL_LOCK; 
    800793    var_DelCallback( p_playlist, "playlist-current", TrackChange, p_intf ); 
    801794    var_DelCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf ); 
     
    809802    if ( p_input ) 
    810803    { 
    811         vlc_object_hold( p_input ); 
    812804        var_DelCallback( p_input, "state", StateChange, p_intf ); 
    813805        vlc_object_release( p_input ); 
    814806    } 
    815807 
    816     PL_UNLOCK; 
    817808    pl_Release( p_intf ); 
    818809 
     
    1000991    p_playlist = pl_Hold( p_intf ); 
    1001992    p_input = playlist_CurrentInput( p_playlist ); 
    1002  
    1003993    if( !p_input ) 
    1004994    { 
    1005         PL_UNLOCK; 
    1006995        pl_Release( p_intf ); 
    1007996        return VLC_SUCCESS; 
    1008997    } 
    1009998 
    1010     vlc_object_hold( p_input ); 
    1011999    pl_Release( p_intf ); 
    10121000 
     
    10421030    if( p_playlist->current.i_size > 0 ) 
    10431031        i_caps |= CAPS_CAN_PLAY | CAPS_CAN_GO_PREV | CAPS_CAN_GO_NEXT; 
    1044      
     1032    if( !b_playlist_locked ) PL_UNLOCK; 
     1033 
    10451034    input_thread_t* p_input = playlist_CurrentInput( p_playlist ); 
    10461035    if( p_input ) 
     
    10521041        if( var_GetBool( p_input, "seekable" ) ) 
    10531042            i_caps |= CAPS_CAN_SEEK; 
    1054     } 
    1055  
    1056     if( !b_playlist_locked ) PL_UNLOCK; 
     1043        vlc_object_release( p_input ); 
     1044    } 
     1045 
    10571046    pl_Release( p_intf ); 
    10581047 
     
    11641153 
    11651154    p_playlist = pl_Hold( p_intf ); 
    1166     if( lock ) 
    1167         PL_LOCK; 
    11681155 
    11691156    i_state = 2; 
     
    11791166        else if( val.i_int <= PLAYING_S ) 
    11801167            i_state = 0; 
     1168        vlc_object_release( p_input ); 
    11811169    } 
    11821170 
     
    11871175    i_loop = var_CreateGetBool( p_playlist, "loop" ); 
    11881176 
    1189     if( lock ) 
    1190         PL_UNLOCK; 
    11911177    pl_Release( p_intf ); 
    11921178