Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Gautam Chitnis
web-ui-redesign
Commits
95e3bb2e
Commit
95e3bb2e
authored
May 28, 2008
by
Pierre d'Herbemont
Browse files
audio_output: Use a destructor.
parent
aeaf0da4
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/audio_output/aout_internal.h
View file @
95e3bb2e
...
...
@@ -110,8 +110,8 @@ void aout_OutputDelete( aout_instance_t * p_aout );
/* From common.c : */
#define aout_New(a) __aout_New(VLC_OBJECT(a))
/* Release with vlc_object_release() */
aout_instance_t
*
__aout_New
(
vlc_object_t
*
);
void
aout_Delete
(
aout_instance_t
*
);
void
aout_FifoInit
(
aout_instance_t
*
,
aout_fifo_t
*
,
uint32_t
);
mtime_t
aout_FifoNextStart
(
aout_instance_t
*
,
aout_fifo_t
*
);
...
...
src/audio_output/common.c
View file @
95e3bb2e
...
...
@@ -36,6 +36,9 @@
* Instances management (internal and external)
*/
/* Local functions */
static
void
aout_Destructor
(
vlc_object_t
*
p_this
);
/*****************************************************************************
* aout_New: initialize aout structure
*****************************************************************************/
...
...
@@ -65,16 +68,17 @@ aout_instance_t * __aout_New( vlc_object_t * p_parent )
val
.
b_bool
=
true
;
var_Set
(
p_aout
,
"intf-change"
,
val
);
vlc_object_set_destructor
(
p_parent
,
aout_Destructor
);
return
p_aout
;
}
/*****************************************************************************
* aout_De
lete
: destroy aout structure
* aout_De
structor
: destroy aout structure
*****************************************************************************/
void
aout_De
lete
(
aout_instance
_t
*
p_
aout
)
static
void
aout_De
structor
(
vlc_object
_t
*
p_
this
)
{
var_Destroy
(
p_aout
,
"intf-change"
);
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
vlc_mutex_destroy
(
&
p_aout
->
input_fifos_lock
);
vlc_mutex_destroy
(
&
p_aout
->
mixer_lock
);
vlc_mutex_destroy
(
&
p_aout
->
output_fifo_lock
);
...
...
src/input/decoder.c
View file @
95e3bb2e
...
...
@@ -988,7 +988,7 @@ static void DeleteDecoder( decoder_t * p_dec )
aout_DecDelete
(
p_dec
->
p_owner
->
p_aout
,
p_dec
->
p_owner
->
p_aout_input
);
if
(
p_dec
->
p_owner
->
p_aout
)
{
aou
t_
D
ele
t
e
(
p_dec
->
p_owner
->
p_aout
);
vlc_objec
t_
r
ele
as
e
(
p_dec
->
p_owner
->
p_aout
);
p_dec
->
p_owner
->
p_aout
=
NULL
;
}
if
(
p_dec
->
p_owner
->
p_vout
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment