[vlc-commits] Fix crash if PulseAudio is compiled-in but not used

Rémi Denis-Courmont git at videolan.org
Sat Apr 2 20:04:06 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr  2 21:03:47 2011 +0300| [a759fe73a5b49a241fb733e073e6702abf495ee7] | committer: Rémi Denis-Courmont

Fix crash if PulseAudio is compiled-in but not used

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a759fe73a5b49a241fb733e073e6702abf495ee7
---

 modules/audio_output/pulse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index b991c71..497bc3d 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -368,6 +368,7 @@ static int Open(vlc_object_t *obj)
     aout_sys_t *sys = malloc(sizeof(*sys));
     if (unlikely(sys == NULL))
         return VLC_ENOMEM;
+    aout->output.p_sys = sys;
     sys->context = NULL;
     sys->stream = NULL;
     //sys->byterate = byterate;
@@ -428,7 +429,6 @@ static int Open(vlc_object_t *obj)
     aout->output.i_nb_samples = pba->minreq / pa_frame_size(&ss);
     pa_threaded_mainloop_unlock(mainloop);
 
-    aout->output.p_sys = sys;
     aout->output.pf_play = Play;
     aout_VolumeSoftInit(aout);
     return VLC_SUCCESS;



More information about the vlc-commits mailing list