Changeset 47fd5024be5edf4ef7f85d56482d17bc598766e3 for modules/control
- Timestamp:
- 28/09/08 02:08:39 (2 months ago)
- git-parent:
- Files:
-
- modules/control/dbus.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/control/dbus.c
rc205ecf r47fd502 168 168 169 169 playlist_t *p_playlist = pl_Hold( ((vlc_object_t*) p_this) ); 170 PL_LOCK;171 170 input_thread_t *p_input = playlist_CurrentInput( p_playlist ); 172 171 … … 177 176 var_Get( p_input, "time", &position ); 178 177 i_pos = position.i_time / 1000; 179 }180 PL_UNLOCK;178 vlc_object_release( p_input ); 179 } 181 180 pl_Release( ((vlc_object_t*) p_this) ); 182 181 ADD_INT32( &i_pos ); … … 207 206 } 208 207 p_playlist = pl_Hold( ((vlc_object_t*) p_this) ); 209 PL_LOCK;210 208 input_thread_t *p_input = playlist_CurrentInput( p_playlist ); 211 209 … … 214 212 position.i_time = i_pos * 1000; 215 213 var_Set( p_input, "time", position ); 216 }217 PL_UNLOCK;214 vlc_object_release( p_input ); 215 } 218 216 pl_Release( ((vlc_object_t*) p_this) ); 219 217 REPLY_SEND; … … 320 318 playlist_t *p_playlist = pl_Hold( (vlc_object_t*) p_this ); 321 319 322 PL_LOCK;323 320 input_thread_t *p_input = playlist_CurrentInput( p_playlist ); 324 if( p_input )325 vlc_object_hold( p_input );326 PL_UNLOCK;327 321 328 322 if( p_input ) … … 797 791 input_thread_t *p_input; 798 792 799 PL_LOCK;800 793 var_DelCallback( p_playlist, "playlist-current", TrackChange, p_intf ); 801 794 var_DelCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf ); … … 809 802 if ( p_input ) 810 803 { 811 vlc_object_hold( p_input );812 804 var_DelCallback( p_input, "state", StateChange, p_intf ); 813 805 vlc_object_release( p_input ); 814 806 } 815 807 816 PL_UNLOCK;817 808 pl_Release( p_intf ); 818 809 … … 1000 991 p_playlist = pl_Hold( p_intf ); 1001 992 p_input = playlist_CurrentInput( p_playlist ); 1002 1003 993 if( !p_input ) 1004 994 { 1005 PL_UNLOCK;1006 995 pl_Release( p_intf ); 1007 996 return VLC_SUCCESS; 1008 997 } 1009 998 1010 vlc_object_hold( p_input );1011 999 pl_Release( p_intf ); 1012 1000 … … 1042 1030 if( p_playlist->current.i_size > 0 ) 1043 1031 i_caps |= CAPS_CAN_PLAY | CAPS_CAN_GO_PREV | CAPS_CAN_GO_NEXT; 1044 1032 if( !b_playlist_locked ) PL_UNLOCK; 1033 1045 1034 input_thread_t* p_input = playlist_CurrentInput( p_playlist ); 1046 1035 if( p_input ) … … 1052 1041 if( var_GetBool( p_input, "seekable" ) ) 1053 1042 i_caps |= CAPS_CAN_SEEK; 1054 }1055 1056 if( !b_playlist_locked ) PL_UNLOCK; 1043 vlc_object_release( p_input ); 1044 } 1045 1057 1046 pl_Release( p_intf ); 1058 1047 … … 1164 1153 1165 1154 p_playlist = pl_Hold( p_intf ); 1166 if( lock )1167 PL_LOCK;1168 1155 1169 1156 i_state = 2; … … 1179 1166 else if( val.i_int <= PLAYING_S ) 1180 1167 i_state = 0; 1168 vlc_object_release( p_input ); 1181 1169 } 1182 1170 … … 1187 1175 i_loop = var_CreateGetBool( p_playlist, "loop" ); 1188 1176 1189 if( lock )1190 PL_UNLOCK;1191 1177 pl_Release( p_intf ); 1192 1178
