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
125988f8
Commit
125988f8
authored
Nov 15, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: deal with failure to restart
Drop audio rather than abort.
parent
c32e21fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
src/audio_output/dec.c
src/audio_output/dec.c
+25
-25
No files found.
src/audio_output/dec.c
View file @
125988f8
...
...
@@ -123,41 +123,41 @@ void aout_DecDelete (audio_output_t *p_aout)
#define AOUT_RESTART_OUTPUT 1
#define AOUT_RESTART_INPUT 2
static
int
aout_CheckRe
start
(
audio_output_t
*
aout
)
static
int
aout_CheckRe
ady
(
audio_output_t
*
aout
)
{
aout_owner_t
*
owner
=
aout_owner
(
aout
);
aout_assert_locked
(
aout
);
int
restart
=
vlc_atomic_swap
(
&
owner
->
restart
,
0
);
if
(
likely
(
restart
==
0
))
return
0
;
assert
(
restart
&
AOUT_RESTART_INPUT
);
const
aout_request_vout_t
request_vout
=
owner
->
request_vout
;
if
(
unlikely
(
restart
))
{
assert
(
restart
&
AOUT_RESTART_INPUT
);
aout_FiltersDelete
(
aout
)
;
const
aout_request_vout_t
request_vout
=
owner
->
request_vout
;
/* Reinitializes the output */
if
(
restart
&
AOUT_RESTART_OUTPUT
)
{
aout_OutputDelete
(
aout
);
owner
->
mixer_format
=
owner
->
input_format
;
if
(
aout_OutputNew
(
aout
,
&
owner
->
mixer_format
))
abort
();
/* FIXME we are officially screwed */
aout_volume_SetFormat
(
owner
->
volume
,
owner
->
mixer_format
.
i_format
);
}
aout_FiltersDelete
(
aout
);
if
(
restart
&
AOUT_RESTART_OUTPUT
)
{
/* Reinitializes the output */
aout_OutputDelete
(
aout
);
owner
->
mixer_format
=
owner
->
input_format
;
if
(
aout_OutputNew
(
aout
,
&
owner
->
mixer_format
))
owner
->
mixer_format
.
i_format
=
0
;
aout_volume_SetFormat
(
owner
->
volume
,
owner
->
mixer_format
.
i_format
);
}
owner
->
sync
.
end
=
VLC_TS_INVALID
;
owner
->
sync
.
resamp_type
=
AOUT_RESAMPLING_NONE
;
owner
->
sync
.
end
=
VLC_TS_INVALID
;
owner
->
sync
.
resamp_type
=
AOUT_RESAMPLING_NONE
;
if
(
aout_FiltersNew
(
aout
,
&
owner
->
input_format
,
&
owner
->
mixer_format
,
&
request_vout
))
{
abort
();
/* FIXME */
if
(
aout_FiltersNew
(
aout
,
&
owner
->
input_format
,
&
owner
->
mixer_format
,
&
request_vout
))
{
aout_OutputDelete
(
aout
);
owner
->
mixer_format
.
i_format
=
0
;
}
}
return
0
;
return
(
owner
->
mixer_format
.
i_format
)
?
0
:
-
1
;
}
/**
...
...
@@ -393,7 +393,7 @@ int aout_DecPlay (audio_output_t *aout, block_t *block, int input_rate)
/
owner
->
input_format
.
i_rate
;
aout_lock
(
aout
);
if
(
unlikely
(
aout_CheckRe
start
(
aout
)))
if
(
unlikely
(
aout_CheckRe
ady
(
aout
)))
goto
drop
;
/* Pipeline is unrecoverably broken :-( */
const
mtime_t
now
=
mdate
(),
advance
=
block
->
i_pts
-
now
;
...
...
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