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
e4f129bf
Commit
e4f129bf
authored
Dec 08, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amem: call cleanup() if setup() succeeded but format is unsupported
parent
d9cf7d2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
modules/audio_output/amem.c
modules/audio_output/amem.c
+15
-15
No files found.
modules/audio_output/amem.c
View file @
e4f129bf
...
...
@@ -148,6 +148,15 @@ static int SoftMuteSet (audio_output_t *aout, bool mute)
return
0
;
}
static
void
Stop
(
audio_output_t
*
aout
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
if
(
sys
->
cleanup
!=
NULL
)
sys
->
cleanup
(
sys
->
opaque
);
sys
->
ready
=
false
;
}
static
int
Start
(
audio_output_t
*
aout
,
audio_sample_format_t
*
fmt
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
...
...
@@ -173,14 +182,14 @@ static int Start (audio_output_t *aout, audio_sample_format_t *fmt)
if
(
sys
->
set_volume
!=
NULL
)
sys
->
set_volume
(
sys
->
opaque
,
sys
->
volume
,
sys
->
mute
);
/* Ensure that format is supported */
if
(
fmt
->
i_rate
==
0
||
fmt
->
i_rate
>
192000
||
channels
==
0
||
channels
>
AOUT_CHAN_MAX
)
return
VLC_EGENERIC
;
/* TODO: amem-format */
if
(
strcmp
(
format
,
"S16N"
))
||
channels
==
0
||
channels
>
AOUT_CHAN_MAX
||
strcmp
(
format
,
"S16N"
)
/* TODO: amem-format */
)
{
msg_Err
(
aout
,
"format not supported"
);
msg_Err
(
aout
,
"format not supported: %s, %u channel(s), %u Hz"
,
format
,
channels
,
fmt
->
i_rate
);
Stop
(
aout
);
return
VLC_EGENERIC
;
}
...
...
@@ -223,15 +232,6 @@ static int Start (audio_output_t *aout, audio_sample_format_t *fmt)
return
VLC_SUCCESS
;
}
static
void
Stop
(
audio_output_t
*
aout
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
if
(
sys
->
cleanup
!=
NULL
)
sys
->
cleanup
(
sys
->
opaque
);
sys
->
ready
=
false
;
}
static
int
Open
(
vlc_object_t
*
obj
)
{
audio_output_t
*
aout
=
(
audio_output_t
*
)
obj
;
...
...
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