]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
avoid the weird usage of assert() in the ALSA header files that gcc 4.2 wants to...
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 26 Sep 2007 23:53:03 +0000 (23:53 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 26 Sep 2007 23:53:03 +0000 (23:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83974 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_alsa.c

index 7e6e4d410733481ebd152263f864410a6ffcc9ec..79bc313cd6f999ad213c6ed530152d34f5672fb6 100644 (file)
@@ -367,7 +367,8 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream)
        } else
                ast_log(LOG_DEBUG, "Opening device %s in %s mode\n", dev, (stream == SND_PCM_STREAM_CAPTURE) ? "read" : "write");
 
-       snd_pcm_hw_params_alloca(&hwparams);
+       hwparams = alloca(snd_pcm_hw_params_sizeof());
+       memset(hwparams, 0, snd_pcm_hw_params_sizeof());
        snd_pcm_hw_params_any(handle, hwparams);
 
        err = snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);
@@ -416,7 +417,8 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream)
        if (err < 0)
                ast_log(LOG_ERROR, "Couldn't set the new hw params: %s\n", snd_strerror(err));
 
-       snd_pcm_sw_params_alloca(&swparams);
+       swparams = alloca(snd_pcm_sw_params_sizeof());
+       memset(swparams, 0, snd_pcm_sw_params_sizeof());
        snd_pcm_sw_params_current(handle, swparams);
 
 #if 1