Changeset a11817c9ba314e5f4f13d33c24d248f51b6ad2d3
- Timestamp:
- 03/30/08 16:54:20
(5 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1206888860 +0200
- git-parent:
[4247f7ce558829ebfb01a888faf53116050c2f33]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1206888538 +0200
- Message:
playlist: Use vlc_object_alive().
We can't do what is advised in the documentation of vlc_object_alive(), but we try to stay close enough of it.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4247f7c |
ra11817c |
|
| 149 | 149 | vlc_thread_ready( p_playlist ); |
|---|
| 150 | 150 | |
|---|
| 151 | | while( !p_playlist->b_die ) |
|---|
| 152 | | { |
|---|
| | 151 | vlc_object_lock( p_playlist ); |
|---|
| | 152 | while( vlc_object_alive( p_playlist ) ) |
|---|
| | 153 | { |
|---|
| | 154 | vlc_object_unlock( p_playlist ); |
|---|
| 153 | 155 | playlist_MainLoop( p_playlist ); |
|---|
| | 156 | vlc_object_lock( p_playlist ); |
|---|
| | 157 | |
|---|
| 154 | 158 | if( p_playlist->b_cant_sleep ) |
|---|
| 155 | 159 | { |
|---|
| 156 | 160 | /* 100 ms is an acceptable delay for playlist operations */ |
|---|
| | 161 | vlc_object_unlock( p_playlist ); |
|---|
| 157 | 162 | msleep( INTF_IDLE_SLEEP*2 ); |
|---|
| | 163 | vlc_object_lock( p_playlist ); |
|---|
| 158 | 164 | } |
|---|
| 159 | 165 | else |
|---|
| 160 | 166 | { |
|---|
| 161 | | PL_LOCK; |
|---|
| 162 | | vlc_bool_t b_die = vlc_object_wait( p_playlist ); |
|---|
| 163 | | PL_UNLOCK; |
|---|
| 164 | | if( b_die ) |
|---|
| 165 | | break; |
|---|
| | 167 | vlc_object_wait( p_playlist ); |
|---|
| 166 | 168 | } |
|---|
| 167 | 169 | } |
|---|
| | 170 | vlc_object_unlock( p_playlist ); |
|---|
| | 171 | |
|---|
| 168 | 172 | playlist_LastLoop( p_playlist ); |
|---|
| 169 | 173 | } |
|---|