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
901267b6
Commit
901267b6
authored
Dec 15, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opensles: avoid infinite loop in linked list
this can happen when moving buffers between our 2 linked lists
parent
913f902e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/audio_output/opensles_android.c
modules/audio_output/opensles_android.c
+7
-2
No files found.
modules/audio_output/opensles_android.c
View file @
901267b6
...
...
@@ -195,6 +195,8 @@ static int WriteBuffer(audio_output_t *p_aout)
/* If something bad happens, we must remove this buffer from the FIFO */
block_t
**
pp_last_saved
=
p_sys
->
pp_last
;
block_t
*
p_last_saved
=
*
pp_last_saved
;
block_t
*
next_saved
=
b
->
p_next
;
b
->
p_next
=
NULL
;
/* Put this block in the list of audio already written to opensles */
block_ChainLastAppend
(
&
p_sys
->
pp_last
,
b
);
...
...
@@ -214,12 +216,15 @@ static int WriteBuffer(audio_output_t *p_aout)
p_sys
->
pp_buffer_last
=
&
p_sys
->
p_buffer_chain
;
}
else
{
/* Remove that block from the list of audio already written */
msg_Err
(
p_aout
,
"error %lu%s"
,
r
,
(
r
==
SL_RESULT_BUFFER_INSUFFICIENT
)
msg_Err
(
p_aout
,
"error %lu%s
(%d bytes)
"
,
r
,
(
r
==
SL_RESULT_BUFFER_INSUFFICIENT
)
?
" buffer insufficient"
:
""
);
:
""
,
b
->
i_buffer
);
p_sys
->
pp_last
=
pp_last_saved
;
*
pp_last_saved
=
p_last_saved
;
b
->
p_next
=
next_saved
;
p_sys
->
length
-=
len
;
next
=
NULL
;
/* We'll try again next time */
}
...
...
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