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
056ee009
Commit
056ee009
authored
Oct 24, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: allocate PCM status on the stack
parent
480f46c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+2
-5
No files found.
modules/audio_output/alsa.c
View file @
056ee009
...
...
@@ -68,8 +68,6 @@ struct aout_sys_t
vlc_mutex_t
lock
;
vlc_cond_t
wait
;
snd_pcm_status_t
*
p_status
;
};
#define A52_FRAME_NB 1536
...
...
@@ -745,7 +743,6 @@ static void* ALSAThread( vlc_object_t* p_this )
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
output
.
p_sys
;
int
canc
=
vlc_savecancel
();
p_sys
->
p_status
=
(
snd_pcm_status_t
*
)
malloc
(
snd_pcm_status_sizeof
());
/* Wait for the exact time to start playing (avoids resampling) */
vlc_mutex_lock
(
&
p_sys
->
lock
);
...
...
@@ -765,7 +762,6 @@ static void* ALSAThread( vlc_object_t* p_this )
cleanup:
snd_pcm_drop
(
p_sys
->
p_snd_pcm
);
free
(
p_aout
->
output
.
p_sys
->
p_status
);
vlc_restorecancel
(
canc
);
return
NULL
;
}
...
...
@@ -777,13 +773,14 @@ static void ALSAFill( aout_instance_t * p_aout )
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
output
.
p_sys
;
aout_buffer_t
*
p_buffer
;
snd_pcm_status_t
*
p_status
=
p_sys
->
p_status
;
snd_pcm_status_t
*
p_status
;
int
i_snd_rc
;
mtime_t
next_date
;
/* Fill in the buffer until space or audio output buffer shortage */
/* Get the status */
snd_pcm_status_alloca
(
&
p_status
);
i_snd_rc
=
snd_pcm_status
(
p_sys
->
p_snd_pcm
,
p_status
);
if
(
i_snd_rc
<
0
)
{
...
...
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