Changeset 3d7eabaf80eb76dc2111f399aec6586d1b0094a8
- Timestamp:
- 05/14/08 21:39:21
(2 months ago)
- Author:
- Rafaël Carré <funman@videolan.org>
- git-committer:
- Rafaël Carré <funman@videolan.org> 1210793961 +0200
- git-parent:
[bb84da65bde754021ec602e99e3861b7e8ebafa3]
- git-author:
- Rafaël Carré <funman@videolan.org> 1210793961 +0200
- Message:
Remove playlist destructor
We need to do stuff BEFORE the playlist is destroyed
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r82921f3 |
r3d7eaba |
|
| 39 | 39 | *****************************************************************************/ |
|---|
| 40 | 40 | static void VariablesInit( playlist_t *p_playlist ); |
|---|
| 41 | | static void playlist_Destructor( vlc_object_t * p_this ); |
|---|
| 42 | 41 | |
|---|
| 43 | 42 | static int RandomCallback( vlc_object_t *p_this, char const *psz_cmd, |
|---|
| … | … | |
| 155 | 154 | p_playlist->b_auto_preparse = true; |
|---|
| 156 | 155 | |
|---|
| 157 | | vlc_object_set_destructor( p_playlist, playlist_Destructor ); |
|---|
| 158 | | |
|---|
| 159 | 156 | return p_playlist; |
|---|
| 160 | 157 | } |
|---|
| … | … | |
| 169 | 166 | void playlist_Destroy( playlist_t *p_playlist ) |
|---|
| 170 | 167 | { |
|---|
| 171 | | /* XXX: should go in the playlist destructor */ |
|---|
| 172 | 168 | var_Destroy( p_playlist, "intf-change" ); |
|---|
| 173 | 169 | var_Destroy( p_playlist, "item-change" ); |
|---|
| … | … | |
| 182 | 178 | var_Destroy( p_playlist, "activity" ); |
|---|
| 183 | 179 | |
|---|
| | 180 | if( p_playlist->p_preparse ) |
|---|
| | 181 | vlc_object_release( p_playlist->p_preparse ); |
|---|
| | 182 | if( p_playlist->p_fetcher ) |
|---|
| | 183 | vlc_object_release( p_playlist->p_fetcher ); |
|---|
| | 184 | |
|---|
| 184 | 185 | vlc_object_release( p_playlist ); |
|---|
| 185 | | } |
|---|
| 186 | | |
|---|
| 187 | | static void playlist_Destructor( vlc_object_t * p_this ) |
|---|
| 188 | | { |
|---|
| 189 | | playlist_t * p_playlist = (playlist_t *)p_this; |
|---|
| 190 | | |
|---|
| 191 | | // Kill preparser |
|---|
| 192 | | if( p_playlist->p_preparse ) |
|---|
| 193 | | { |
|---|
| 194 | | vlc_object_release( p_playlist->p_preparse ); |
|---|
| 195 | | } |
|---|
| 196 | | |
|---|
| 197 | | // Kill meta fetcher |
|---|
| 198 | | if( p_playlist->p_fetcher ) |
|---|
| 199 | | { |
|---|
| 200 | | vlc_object_release( p_playlist->p_fetcher ); |
|---|
| 201 | | } |
|---|
| 202 | 186 | } |
|---|
| 203 | 187 | |
|---|