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
6488ad92
Commit
6488ad92
authored
May 11, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access/alsa.c: fixup
4b0e0dcd
Previous commit was wrong, this fixes it.
parent
4b0e0dcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
modules/access/alsa.c
modules/access/alsa.c
+8
-6
No files found.
modules/access/alsa.c
View file @
6488ad92
...
@@ -363,7 +363,7 @@ static int Demux( demux_t *p_demux )
...
@@ -363,7 +363,7 @@ static int Demux( demux_t *p_demux )
static
block_t
*
GrabAudio
(
demux_t
*
p_demux
)
static
block_t
*
GrabAudio
(
demux_t
*
p_demux
)
{
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
int
i_read
,
i_correct
,
i_error
;
int
i_read
,
i_correct
;
block_t
*
p_block
;
block_t
*
p_block
;
if
(
p_sys
->
p_block
)
p_block
=
p_sys
->
p_block
;
if
(
p_sys
->
p_block
)
p_block
=
p_sys
->
p_block
;
...
@@ -379,13 +379,15 @@ static block_t* GrabAudio( demux_t *p_demux )
...
@@ -379,13 +379,15 @@ static block_t* GrabAudio( demux_t *p_demux )
/* ALSA */
/* ALSA */
i_read
=
snd_pcm_readi
(
p_sys
->
p_alsa_pcm
,
p_block
->
p_buffer
,
p_sys
->
i_alsa_chunk_size
);
i_read
=
snd_pcm_readi
(
p_sys
->
p_alsa_pcm
,
p_block
->
p_buffer
,
p_sys
->
i_alsa_chunk_size
);
if
(
i_read
==
-
EAGAIN
||
((
i_read
>=
0
)
&&
(
i_read
<
p_sys
->
i_alsa_chunk_size
))
)
if
(
i_read
==
-
EAGAIN
)
i_error
=
snd_pcm_wait
(
p_sys
->
p_alsa_pcm
,
10
);
/* See poll() comment in oss.c */
{
else
i_error
=
i_read
;
snd_pcm_wait
(
p_sys
->
p_alsa_pcm
,
10
);
/* See poll() comment in oss.c */
return
NULL
;
}
if
(
i_
error
<=
0
)
if
(
i_
read
<=
0
)
{
{
switch
(
i_
error
)
switch
(
i_
read
)
{
{
case
-
EPIPE
:
case
-
EPIPE
:
/* xrun */
/* xrun */
...
...
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