[vlc-commits] commit: ALSA: give a clue that VLC might fail with alsa-lib <= 1.0.23... ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed Apr 21 19:38:08 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 21 20:37:07 2010 +0300| [e2552af97ab56adfd3090bf840d1860da5c0d128] | committer: Rémi Denis-Courmont 

ALSA: give a clue that VLC might fail with alsa-lib <= 1.0.23...

...as reported earlier on vlc-devel (not reproducible by me).
(cherry picked from commit 05c3c71df21fe5aca59f631b3841e70dbd2bd8db)

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

 modules/audio_output/alsa.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index ac19bd9..185c56d 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -283,6 +283,18 @@ static void Probe( aout_instance_t * p_aout,
     if( val.i_int <= 0 )
     {
         /* Probe() has failed. */
+#if (SND_LIB_VERSION <= 0x010017)
+# warning Please update alsa-lib to version > 1.0.23.
+        var_Create( p_aout->p_libvlc, "alsa-broken", VLC_VAR_BOOL );
+        if( !var_GetBool( p_aout->p_libvlc, "alsa-broken" ) )
+        {
+            var_SetBool( p_aout->p_libvlc, "alsa-broken", true );
+            dialog_FatalWait( p_aout, "Potential ALSA version problem",
+                "VLC failed to initialize your sound output device (if any).\n"
+                "Please update alsa-lib to version 1.0.24 or higher "
+                "to try to fix this issue." );
+        }
+#endif
         msg_Dbg( p_aout, "failed to find a usable ALSA configuration" );
         var_Destroy( p_aout, "audio-device" );
         GetDevices( VLC_OBJECT(p_aout), NULL );



More information about the vlc-commits mailing list