Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
29317fb1
Commit
29317fb1
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
(cherry picked from commit
4f292d82
)
parent
d5922c52
Changes
1
Show 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 @
29317fb1
...
@@ -97,7 +97,7 @@ int aout_DecNew( audio_output_t *p_aout,
...
@@ -97,7 +97,7 @@ int aout_DecNew( audio_output_t *p_aout,
aout_Shutdown
(
p_aout
);
aout_Shutdown
(
p_aout
);
}
}
#endif
#endif
int
ret
=
-
1
;
int
ret
=
0
;
/* TODO: reduce lock scope depending on decoder's real need */
/* TODO: reduce lock scope depending on decoder's real need */
aout_lock
(
p_aout
);
aout_lock
(
p_aout
);
...
@@ -110,7 +110,10 @@ int aout_DecNew( audio_output_t *p_aout,
...
@@ -110,7 +110,10 @@ int aout_DecNew( audio_output_t *p_aout,
owner
->
input_format
=
*
p_format
;
owner
->
input_format
=
*
p_format
;
vlc_atomic_set
(
&
owner
->
restart
,
0
);
vlc_atomic_set
(
&
owner
->
restart
,
0
);
if
(
aout_OutputNew
(
p_aout
,
p_format
)
<
0
)
if
(
aout_OutputNew
(
p_aout
,
p_format
)
<
0
)
{
ret
=
-
1
;
goto
error
;
goto
error
;
}
/* Allocate a software mixer */
/* Allocate a software mixer */
assert
(
owner
->
volume
.
mixer
==
NULL
);
assert
(
owner
->
volume
.
mixer
==
NULL
);
...
@@ -129,9 +132,15 @@ int aout_DecNew( audio_output_t *p_aout,
...
@@ -129,9 +132,15 @@ int aout_DecNew( audio_output_t *p_aout,
owner
->
input
=
aout_InputNew
(
p_aout
,
p_format
,
&
owner
->
mixer_format
,
owner
->
input
=
aout_InputNew
(
p_aout
,
p_format
,
&
owner
->
mixer_format
,
p_request_vout
);
p_request_vout
);
if
(
owner
->
input
==
NULL
)
if
(
owner
->
input
==
NULL
)
{
struct
audio_mixer
*
mixer
=
owner
->
volume
.
mixer
;
owner
->
volume
.
mixer
=
NULL
;
aout_OutputDelete
(
p_aout
);
aout_OutputDelete
(
p_aout
);
else
aout_unlock
(
p_aout
);
ret
=
0
;
aout_MixerDelete
(
mixer
);
return
-
1
;
}
error:
error:
aout_unlock
(
p_aout
);
aout_unlock
(
p_aout
);
return
ret
;
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