Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
85658965
Commit
85658965
authored
Apr 21, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alsa_output: don't use atexit() to clean up the ALSA library
Call snd_config_update_free_global() manually in our finish() method, don't use atexit().
parent
eb059a78
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
alsa_plugin.c
src/output/alsa_plugin.c
+3
-7
No files found.
src/output/alsa_plugin.c
View file @
85658965
...
...
@@ -136,15 +136,8 @@ alsa_init(G_GNUC_UNUSED const struct audio_format *audio_format,
const
struct
config_param
*
param
,
G_GNUC_UNUSED
GError
**
error
)
{
/* no need for pthread_once thread-safety when reading config */
static
int
free_global_registered
;
struct
alsa_data
*
ad
=
alsa_data_new
();
if
(
!
free_global_registered
)
{
atexit
((
void
(
*
)(
void
))
snd_config_update_free_global
);
free_global_registered
=
1
;
}
alsa_configure
(
ad
,
param
);
return
ad
;
...
...
@@ -156,6 +149,9 @@ alsa_finish(void *data)
struct
alsa_data
*
ad
=
data
;
alsa_data_free
(
ad
);
/* free libasound's config cache */
snd_config_update_free_global
();
}
static
bool
...
...
Write
Preview
Markdown
is supported
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