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
57ef9e43
Commit
57ef9e43
authored
Aug 20, 2009
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spdif: Use aout_FifoPop() which checks locking and fix a aout_FifoPop() leak.
Pointed-out-by a warning.
parent
1f22d722
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
16 deletions
+5
-16
modules/audio_mixer/spdif.c
modules/audio_mixer/spdif.c
+5
-16
No files found.
modules/audio_mixer/spdif.c
View file @
57ef9e43
...
...
@@ -81,30 +81,19 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
int
i
=
0
;
aout_input_t
*
p_input
=
p_aout
->
pp_inputs
[
i
];
while
(
p_input
->
b_error
||
p_input
->
b_paused
)
{
p_input
=
p_aout
->
pp_inputs
[
++
i
];
}
aout_FifoPop
(
p_aout
,
&
p_input
->
fifo
);
aout_buffer_t
*
p_old_buffer
=
aout_FifoPop
(
p_aout
,
&
p_input
->
fifo
);
aout_BufferFree
(
p_old_buffer
);
/* Empty other FIFOs to avoid a memory leak. */
for
(
i
++
;
i
<
p_aout
->
i_nb_inputs
;
i
++
)
{
aout_fifo_t
*
p_fifo
;
aout_buffer_t
*
p_deleted
;
p_input
=
p_aout
->
pp_inputs
[
i
];
if
(
p_input
->
b_error
||
p_input
->
b_paused
)
continue
;
p_fifo
=
&
p_input
->
fifo
;
p_deleted
=
p_fifo
->
p_first
;
while
(
p_deleted
!=
NULL
)
{
aout_buffer_t
*
p_next
=
p_deleted
->
p_next
;
aout_BufferFree
(
p_deleted
);
p_deleted
=
p_next
;
}
p_fifo
->
p_first
=
NULL
;
p_fifo
->
pp_last
=
&
p_fifo
->
p_first
;
while
((
p_old_buffer
=
aout_FifoPop
(
p_aout
,
&
p_input
->
fifo
)))
aout_BufferFree
(
p_old_buffer
);
}
}
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