Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sergio Ammirata
VLC
Commits
42937c98
Commit
42937c98
authored
Apr 22, 2021
by
Thomas Guillem
Committed by
Jean-Baptiste Kempf
May 27, 2021
Browse files
auhal: reset au_unit in case of failure or when stopped
parent
f7c4d13f
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/audio_output/auhal.c
View file @
42937c98
...
...
@@ -1112,6 +1112,7 @@ StartAnalog(audio_output_t *p_aout, audio_sample_format_t *fmt)
return
VLC_SUCCESS
;
error:
AudioComponentInstanceDispose
(
p_sys
->
au_unit
);
p_sys
->
au_unit
=
NULL
;
free
(
layout
);
return
VLC_EGENERIC
;
}
...
...
@@ -1398,6 +1399,7 @@ Stop(audio_output_t *p_aout)
AudioOutputUnitStop
(
p_sys
->
au_unit
);
au_Uninitialize
(
p_aout
,
p_sys
->
au_unit
);
AudioComponentInstanceDispose
(
p_sys
->
au_unit
);
p_sys
->
au_unit
=
NULL
;
}
else
{
...
...
@@ -1485,8 +1487,6 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
return
VLC_EGENERIC
;
p_sys
=
p_aout
->
sys
;
p_sys
->
b_digital
=
false
;
p_sys
->
au_unit
=
NULL
;
p_sys
->
i_stream_index
=
-
1
;
p_sys
->
b_revert
=
false
;
p_sys
->
b_changed_mixing
=
false
;
...
...
@@ -1681,6 +1681,7 @@ static int Open(vlc_object_t *obj)
vlc_mutex_init
(
&
p_sys
->
device_list_lock
);
vlc_mutex_init
(
&
p_sys
->
selected_device_lock
);
p_sys
->
b_digital
=
false
;
p_sys
->
au_unit
=
NULL
;
p_sys
->
b_ignore_streams_changed_callback
=
false
;
p_sys
->
b_selected_dev_is_default
=
false
;
memset
(
&
p_sys
->
sfmt_revert
,
0
,
sizeof
(
p_sys
->
sfmt_revert
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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