Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f99bd91c
Commit
f99bd91c
authored
Aug 16, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: fix crash if input restart fails
parent
617c3420
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
src/audio_output/dec.c
src/audio_output/dec.c
+18
-13
No files found.
src/audio_output/dec.c
View file @
f99bd91c
...
...
@@ -149,6 +149,7 @@ void aout_Shutdown (audio_output_t *p_aout)
aout_lock
(
p_aout
);
/* Remove the input. */
input
=
owner
->
input
;
if
(
likely
(
input
!=
NULL
))
aout_InputDelete
(
p_aout
,
input
);
owner
->
input
=
NULL
;
...
...
@@ -174,11 +175,8 @@ void aout_Shutdown (audio_output_t *p_aout)
*/
void
aout_DecDelete
(
audio_output_t
*
aout
)
{
aout_owner_t
*
owner
=
aout_owner
(
aout
);
assert
(
owner
->
module
!=
NULL
);
#ifdef RECYCLE
(
void
)
owner
;
(
void
)
aout
;
#else
aout_Shutdown
(
aout
);
#endif
...
...
@@ -200,6 +198,7 @@ static void aout_CheckRestart (audio_output_t *aout)
const
aout_request_vout_t
request_vout
=
owner
->
input
->
request_vout
;
if
(
likely
(
owner
->
input
!=
NULL
))
aout_InputDelete
(
aout
,
owner
->
input
);
owner
->
input
=
NULL
;
...
...
@@ -282,7 +281,7 @@ void aout_DecDeleteBuffer (audio_output_t *aout, block_t *block)
int
aout_DecPlay
(
audio_output_t
*
p_aout
,
block_t
*
p_buffer
,
int
i_input_rate
)
{
aout_owner_t
*
owner
=
aout_owner
(
p_aout
);
aout_input_t
*
p_input
=
owner
->
input
;
aout_input_t
*
input
;
assert
(
i_input_rate
>=
INPUT_RATE_DEFAULT
/
AOUT_MAX_INPUT_RATE
&&
i_input_rate
<=
INPUT_RATE_DEFAULT
*
AOUT_MAX_INPUT_RATE
);
...
...
@@ -292,17 +291,18 @@ int aout_DecPlay (audio_output_t *p_aout, block_t *p_buffer, int i_input_rate)
/
owner
->
input_format
.
i_rate
;
aout_lock
(
p_aout
);
if
(
unlikely
(
p_input
==
NULL
))
/* can happen due to restart */
aout_CheckRestart
(
p_aout
);
input
=
owner
->
input
;
if
(
unlikely
(
input
==
NULL
))
/* can happen due to restart */
{
aout_unlock
(
p_aout
);
aout_BufferFree
(
p_buffer
);
return
-
1
;
}
aout_CheckRestart
(
p_aout
);
/* Input */
p_buffer
=
aout_InputPlay
(
p_aout
,
p_
input
,
p_buffer
,
i_input_rate
,
p_buffer
=
aout_InputPlay
(
p_aout
,
input
,
p_buffer
,
i_input_rate
,
&
owner
->
sync
.
date
);
if
(
p_buffer
!=
NULL
)
{
...
...
@@ -331,8 +331,13 @@ int aout_DecGetResetLost (audio_output_t *aout)
int
val
;
aout_lock
(
aout
);
if
(
likely
(
input
!=
NULL
))
{
val
=
input
->
i_buffer_lost
;
input
->
i_buffer_lost
=
0
;
}
else
val
=
0
;
/* if aout_CheckRestart() failed */
aout_unlock
(
aout
);
return
val
;
...
...
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