]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/alsa.c
Do not assert memory allocations
[vlc] / modules / audio_output / alsa.c
index 28d3102246ee529b4cb8165ea8e4e4d600a4f2c9..36b8c9a9904ce5f7e1598f76cffc57f98ef12134 100644 (file)
@@ -31,6 +31,8 @@
 # include "config.h"
 #endif
 
+#include <assert.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 
@@ -269,7 +271,7 @@ static void Probe( aout_instance_t * p_aout,
     {
         if( var_GetBool( p_aout->p_libvlc, "alsa-working" ) )
             dialog_FatalWait( p_aout, "ALSA version problem",
-                "VLC failed to re-open your sound card.\n"
+                "VLC failed to re-initialize your sound output device.\n"
                 "Please update alsa-lib to version 1.0.22 or higher "
                 "to fix this issue." );
     }
@@ -1000,11 +1002,9 @@ static void GetDevicesForCard( module_config_t *p_item, int i_card )
             break;
         }
 
-        p_item->ppsz_list =
-            (char **)realloc( p_item->ppsz_list,
+        p_item->ppsz_list = xrealloc( p_item->ppsz_list,
                               (p_item->i_list + 2) * sizeof(char *) );
-        p_item->ppsz_list_text =
-            (char **)realloc( p_item->ppsz_list_text,
+        p_item->ppsz_list_text = xrealloc( p_item->ppsz_list_text,
                               (p_item->i_list + 2) * sizeof(char *) );
         p_item->ppsz_list[ p_item->i_list ] = psz_device;
         p_item->ppsz_list_text[ p_item->i_list ] = psz_descr;