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
1a5aaf25
Commit
1a5aaf25
authored
Dec 08, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amem: correct opaque pointer for consecutive setup() calls
parent
a762948c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
modules/audio_output/amem.c
modules/audio_output/amem.c
+12
-3
No files found.
modules/audio_output/amem.c
View file @
1a5aaf25
...
...
@@ -58,7 +58,11 @@ struct aout_sys_t
int
(
*
setup
)
(
void
**
,
char
*
,
unsigned
*
,
unsigned
*
);
union
{
void
(
*
cleanup
)
(
void
*
opaque
);
struct
{
void
*
setup_opaque
;
void
(
*
cleanup
)
(
void
*
opaque
);
};
struct
{
unsigned
rate
:
18
;
...
...
@@ -149,6 +153,7 @@ static int Start (audio_output_t *aout, audio_sample_format_t *fmt)
{
channels
=
aout_FormatNbChannels
(
fmt
);
sys
->
opaque
=
sys
->
setup_opaque
;
if
(
sys
->
setup
(
&
sys
->
opaque
,
format
,
&
fmt
->
i_rate
,
&
channels
))
return
VLC_EGENERIC
;
}
...
...
@@ -223,13 +228,16 @@ static int Open (vlc_object_t *obj)
if
(
unlikely
(
sys
==
NULL
))
return
VLC_ENOMEM
;
aout
->
sys
=
sys
;
sys
->
opaque
=
var_InheritAddress
(
obj
,
"amem-data"
);
void
*
opaque
=
var_InheritAddress
(
obj
,
"amem-data"
);
sys
->
setup
=
var_InheritAddress
(
obj
,
"amem-setup"
);
if
(
sys
->
setup
!=
NULL
)
{
sys
->
setup_opaque
=
opaque
;
sys
->
cleanup
=
var_InheritAddress
(
obj
,
"amem-cleanup"
);
}
else
{
sys
->
opaque
=
opaque
;
sys
->
rate
=
var_InheritInteger
(
obj
,
"amem-rate"
);
sys
->
channels
=
var_InheritInteger
(
obj
,
"amem-channels"
);
}
...
...
@@ -247,6 +255,7 @@ static int Open (vlc_object_t *obj)
return
VLC_EGENERIC
;
}
aout
->
sys
=
sys
;
aout
->
start
=
Start
;
aout
->
stop
=
Stop
;
aout
->
time_get
=
NULL
;
...
...
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