[vlc-commits] amem: fix conditionally unitialized cleanup callback
Rémi Denis-Courmont
git at videolan.org
Sun Jun 30 18:13:59 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 30 19:13:37 2013 +0300| [d4a0c69dc3635ac6d7d82e34b26de9ddecc9dbbb] | committer: Rémi Denis-Courmont
amem: fix conditionally unitialized cleanup callback
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d4a0c69dc3635ac6d7d82e34b26de9ddecc9dbbb
---
modules/audio_output/amem.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/audio_output/amem.c b/modules/audio_output/amem.c
index 0296fc4..5e55ef6 100644
--- a/modules/audio_output/amem.c
+++ b/modules/audio_output/amem.c
@@ -56,12 +56,12 @@ struct aout_sys_t
{
void *opaque;
int (*setup) (void **, char *, unsigned *, unsigned *);
+ void (*cleanup) (void *opaque);
union
{
struct
{
void *setup_opaque;
- void (*cleanup) (void *opaque);
};
struct
{
@@ -243,11 +243,12 @@ static int Open (vlc_object_t *obj)
sys->setup = var_InheritAddress (obj, "amem-setup");
if (sys->setup != NULL)
{
- sys->setup_opaque = opaque;
sys->cleanup = var_InheritAddress (obj, "amem-cleanup");
+ sys->setup_opaque = opaque;
}
else
{
+ sys->cleanup = NULL;
sys->opaque = opaque;
sys->rate = var_InheritInteger (obj, "amem-rate");
sys->channels = var_InheritInteger (obj, "amem-channels");
More information about the vlc-commits
mailing list