]> git.sesse.net Git - vlc/commitdiff
Fix a segfault when using "Shift+a" with dummy audio output.
authorRémi Duraffort <ivoire@videolan.org>
Mon, 15 Jun 2009 08:25:02 +0000 (10:25 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 15 Jun 2009 09:49:19 +0000 (11:49 +0200)
This segfault happend because :
 * the variable "audio-device" wasn't created
 * hotkeys module (and others) expect the variable to exist.

modules/misc/dummy/aout.c

index e648a335d2fb41d85e63789d882227f277b4ebc8..4d6c247fe0e2eafc007eb5c73b933ffc4d371177 100644 (file)
@@ -62,7 +62,11 @@ int OpenAudio ( vlc_object_t * p_this )
     {
         p_aout->output.i_nb_samples = FRAME_SIZE;
     }
-    return 0;
+
+    /* Create the variable for the audio-device */
+    var_Create( p_aout, "audio-device", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
+
+    return VLC_SUCCESS;
 }
 
 /*****************************************************************************