Changeset 95e3bb2eaf22929dac3e2c37a26a23e9a0619333
- Timestamp:
- 05/28/08 03:06:44
(3 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1211936804 +0200
- git-parent:
[aeaf0da4ea02c39b49bc49493a8a6c2de3dec411]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1211936774 +0200
- Message:
audio_output: Use a destructor.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2ea3b5f |
r95e3bb2 |
|
| 111 | 111 | /* From common.c : */ |
|---|
| 112 | 112 | #define aout_New(a) __aout_New(VLC_OBJECT(a)) |
|---|
| | 113 | /* Release with vlc_object_release() */ |
|---|
| 113 | 114 | aout_instance_t * __aout_New ( vlc_object_t * ); |
|---|
| 114 | | void aout_Delete ( aout_instance_t * ); |
|---|
| 115 | 115 | |
|---|
| 116 | 116 | void aout_FifoInit( aout_instance_t *, aout_fifo_t *, uint32_t ); |
|---|
| r6da90a1 |
r95e3bb2 |
|
| 37 | 37 | */ |
|---|
| 38 | 38 | |
|---|
| | 39 | /* Local functions */ |
|---|
| | 40 | static void aout_Destructor( vlc_object_t * p_this ); |
|---|
| | 41 | |
|---|
| 39 | 42 | /***************************************************************************** |
|---|
| 40 | 43 | * aout_New: initialize aout structure |
|---|
| … | … | |
| 66 | 69 | var_Set( p_aout, "intf-change", val ); |
|---|
| 67 | 70 | |
|---|
| | 71 | vlc_object_set_destructor( p_parent, aout_Destructor ); |
|---|
| | 72 | |
|---|
| 68 | 73 | return p_aout; |
|---|
| 69 | 74 | } |
|---|
| 70 | 75 | |
|---|
| 71 | 76 | /***************************************************************************** |
|---|
| 72 | | * aout_Delete: destroy aout structure |
|---|
| 73 | | *****************************************************************************/ |
|---|
| 74 | | void aout_Delete( aout_instance_t * p_aout ) |
|---|
| 75 | | { |
|---|
| 76 | | var_Destroy( p_aout, "intf-change" ); |
|---|
| 77 | | |
|---|
| | 77 | * aout_Destructor: destroy aout structure |
|---|
| | 78 | *****************************************************************************/ |
|---|
| | 79 | static void aout_Destructor( vlc_object_t * p_this ) |
|---|
| | 80 | { |
|---|
| | 81 | aout_instance_t * p_aout = (aout_instance_t *)p_this; |
|---|
| 78 | 82 | vlc_mutex_destroy( &p_aout->input_fifos_lock ); |
|---|
| 79 | 83 | vlc_mutex_destroy( &p_aout->mixer_lock ); |
|---|
| ra398f40 |
r95e3bb2 |
|
| 989 | 989 | if( p_dec->p_owner->p_aout ) |
|---|
| 990 | 990 | { |
|---|
| 991 | | aout_Delete( p_dec->p_owner->p_aout ); |
|---|
| | 991 | vlc_object_release( p_dec->p_owner->p_aout ); |
|---|
| 992 | 992 | p_dec->p_owner->p_aout = NULL; |
|---|
| 993 | 993 | } |
|---|