Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
4f292d82
Commit
4f292d82
authored
Mar 07, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mixer leak (and crash at exit) when audio output fails
parent
a71d3315
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
src/audio_output/dec.c
src/audio_output/dec.c
+12
-3
No files found.
src/audio_output/dec.c
View file @
4f292d82
...
...
@@ -97,7 +97,7 @@ int aout_DecNew( audio_output_t *p_aout,
aout_Shutdown
(
p_aout
);
}
#endif
int
ret
=
-
1
;
int
ret
=
0
;
/* TODO: reduce lock scope depending on decoder's real need */
aout_lock
(
p_aout
);
...
...
@@ -110,7 +110,10 @@ int aout_DecNew( audio_output_t *p_aout,
owner
->
input_format
=
*
p_format
;
vlc_atomic_set
(
&
owner
->
restart
,
0
);
if
(
aout_OutputNew
(
p_aout
,
p_format
)
<
0
)
{
ret
=
-
1
;
goto
error
;
}
/* Allocate a software mixer */
assert
(
owner
->
volume
.
mixer
==
NULL
);
...
...
@@ -129,9 +132,15 @@ int aout_DecNew( audio_output_t *p_aout,
owner
->
input
=
aout_InputNew
(
p_aout
,
p_format
,
&
owner
->
mixer_format
,
p_request_vout
);
if
(
owner
->
input
==
NULL
)
{
struct
audio_mixer
*
mixer
=
owner
->
volume
.
mixer
;
owner
->
volume
.
mixer
=
NULL
;
aout_OutputDelete
(
p_aout
);
else
ret
=
0
;
aout_unlock
(
p_aout
);
aout_MixerDelete
(
mixer
);
return
-
1
;
}
error:
aout_unlock
(
p_aout
);
return
ret
;
...
...
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