[vlc-commits] audiotrack: fix crash

Thomas Guillem git at videolan.org
Thu Mar 5 18:46:02 CET 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar  5 17:17:50 2015 +0100| [d693e502b56d6845ddaa4703d9c8092edbcd0349] | committer: Jean-Baptiste Kempf

audiotrack: fix crash

Create the thread after p_aout->sys is set.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/audio_output/audiotrack.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index e21e31e..7ac723a 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -1211,6 +1211,16 @@ Open( vlc_object_t *obj )
     vlc_cond_init( &p_sys->cond );
     TAILQ_INIT( &p_sys->thread_cmd_queue );
 
+    p_aout->sys = p_sys;
+    p_aout->start = Start;
+    p_aout->stop = Stop;
+    p_aout->play = Play;
+    p_aout->pause = Pause;
+    p_aout->flush = Flush;
+    p_aout->time_get = TimeGet;
+
+    aout_SoftVolumeInit( p_aout );
+
     /* create JNIThread */
     p_sys->b_thread_run = true;
     if( vlc_clone( &p_sys->thread,
@@ -1222,16 +1232,6 @@ Open( vlc_object_t *obj )
         return VLC_EGENERIC;
     }
 
-    p_aout->sys = p_sys;
-    p_aout->start = Start;
-    p_aout->stop = Stop;
-    p_aout->play = Play;
-    p_aout->pause = Pause;
-    p_aout->flush = Flush;
-    p_aout->time_get = TimeGet;
-
-    aout_SoftVolumeInit( p_aout );
-
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list