Changeset a15af1b90a7ee88f76a1f67c1fdd13efe885a564
- Timestamp:
- 05/07/08 19:48:38
(3 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1215280118 +0200
- git-parent:
[b0d34dd091e493f5c1cc4940ece339d4dda775bb]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1215279170 +0200
- Message:
macosx: Make sure we don't leak an input_thread_t.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rb94083f |
ra15af1b |
|
| 67 | 67 | { |
|---|
| 68 | 68 | NSAutoreleasePool * o_pool; |
|---|
| 69 | | |
|---|
| 70 | | /* the current input */ |
|---|
| 71 | | input_thread_t * p_input; |
|---|
| 72 | 69 | |
|---|
| 73 | 70 | /* special actions */ |
|---|
| r560016e |
ra15af1b |
|
| 1133 | 1133 | { |
|---|
| 1134 | 1134 | playlist_t * p_playlist; |
|---|
| | 1135 | input_thread_t * p_input = NULL; |
|---|
| 1135 | 1136 | |
|---|
| 1136 | 1137 | /* new thread requires a new pool */ |
|---|
| … | … | |
| 1154 | 1155 | vlc_mutex_lock( &p_intf->change_lock ); |
|---|
| 1155 | 1156 | |
|---|
| 1156 | | if( p_intf->p_sys->p_input == NULL ) |
|---|
| 1157 | | { |
|---|
| 1158 | | p_intf->p_sys->p_input = playlist_CurrentInput( p_playlist ); |
|---|
| | 1157 | if( !p_input ) |
|---|
| | 1158 | { |
|---|
| | 1159 | p_input = playlist_CurrentInput( p_playlist ); |
|---|
| 1159 | 1160 | |
|---|
| 1160 | 1161 | /* Refresh the interface */ |
|---|
| 1161 | | if( p_intf->p_sys->p_input ) |
|---|
| | 1162 | if( p_input ) |
|---|
| 1162 | 1163 | { |
|---|
| 1163 | 1164 | msg_Dbg( p_intf, "input has changed, refreshing interface" ); |
|---|
| … | … | |
| 1165 | 1166 | } |
|---|
| 1166 | 1167 | } |
|---|
| 1167 | | else if( !vlc_object_alive (p_intf->p_sys->p_input) || p_intf->p_sys->p_input->b_dead ) |
|---|
| | 1168 | else if( !vlc_object_alive (p_input) || p_input->b_dead ) |
|---|
| 1168 | 1169 | { |
|---|
| 1169 | 1170 | /* input stopped */ |
|---|
| … | … | |
| 1171 | 1172 | p_intf->p_sys->i_play_status = END_S; |
|---|
| 1172 | 1173 | msg_Dbg( p_intf, "input has stopped, refreshing interface" ); |
|---|
| 1173 | | vlc_object_release( p_intf->p_sys->p_input ); |
|---|
| 1174 | | p_intf->p_sys->p_input = NULL; |
|---|
| | 1174 | vlc_object_release( p_input ); |
|---|
| | 1175 | p_input = NULL; |
|---|
| 1175 | 1176 | } |
|---|
| 1176 | 1177 | |
|---|
| … | … | |
| 1184 | 1185 | vlc_object_unlock( p_intf ); |
|---|
| 1185 | 1186 | [o_pool release]; |
|---|
| | 1187 | |
|---|
| | 1188 | if( p_input ) vlc_object_release( p_input ); |
|---|
| 1186 | 1189 | |
|---|
| 1187 | 1190 | var_DelCallback( p_playlist, "playlist-current", PlaylistChanged, self ); |
|---|