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
975143ab
Commit
975143ab
authored
Oct 29, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output_control: fixed deadlock in audio_output_update()
Call a version of audio_output_close() which doesn't lock recursively.
parent
bb5acc93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
output_control.c
src/output_control.c
+21
-1
No files found.
src/output_control.c
View file @
975143ab
...
...
@@ -157,6 +157,26 @@ audio_output_open(struct audio_output *ao,
return
open
;
}
/**
* Same as audio_output_close(), but expects the lock to be held by
* the caller.
*/
static
void
audio_output_close_locked
(
struct
audio_output
*
ao
)
{
if
(
ao
->
mixer
!=
NULL
)
mixer_auto_close
(
ao
->
mixer
);
assert
(
!
ao
->
open
||
ao
->
fail_timer
==
NULL
);
if
(
ao
->
open
)
ao_command
(
ao
,
AO_COMMAND_CLOSE
);
else
if
(
ao
->
fail_timer
!=
NULL
)
{
g_timer_destroy
(
ao
->
fail_timer
);
ao
->
fail_timer
=
NULL
;
}
}
bool
audio_output_update
(
struct
audio_output
*
ao
,
const
struct
audio_format
*
audio_format
,
...
...
@@ -174,7 +194,7 @@ audio_output_update(struct audio_output *ao,
return
success
;
}
}
else
if
(
audio_output_is_open
(
ao
))
audio_output_close
(
ao
);
audio_output_close
_locked
(
ao
);
g_mutex_unlock
(
ao
->
mutex
);
return
false
;
...
...
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