[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 19:57:32 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Mon Jun 15 10:25:02 2009 +0200| [7e399104c3bbf98c285b2c7ea65ec6e6b732ec4c] | 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.
(cherry picked from commit 94ca05ff5b10347cc37d21ed74d488eb3007218c)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 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 a5b62d3..e1e64ff 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