[vlc-devel] commit: Fix a segfault when using "Shift+a" with dummy audio output. ( Rémi Duraffort )

git version control git at videolan.org
Mon Jun 15 11:49:49 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jun 15 10:25:02 2009 +0200| [94ca05ff5b10347cc37d21ed74d488eb3007218c] | committer: Rémi Duraffort 

Fix a segfault when using "Shift+a" with dummy audio output.
This segfault happend because :
 * the variable "audio-device" wasn't created
 * hotkeys module (and others) expect the variable to exist.

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

 modules/misc/dummy/aout.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/misc/dummy/aout.c b/modules/misc/dummy/aout.c
index e648a33..4d6c247 100644
--- a/modules/misc/dummy/aout.c
+++ b/modules/misc/dummy/aout.c
@@ -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;
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list