diff options
Diffstat (limited to 'plugins/alsa/alsa-plug-route.c')
-rw-r--r-- | plugins/alsa/alsa-plug-route.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/alsa/alsa-plug-route.c b/plugins/alsa/alsa-plug-route.c index c00c0cf..ebc7074 100644 --- a/plugins/alsa/alsa-plug-route.c +++ b/plugins/alsa/alsa-plug-route.c @@ -113,7 +113,17 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o goto fail_nodump; } - zone->params = pcmRoute->params; + pcmRoute->params = ApiPcmParamsDup(mixer, pcmRoute->params); + if (!pcmRoute->params) { + SOFTMIXER_NOMEM(mixer->api); + goto fail_nodump; + } + + zone->params = ApiPcmParamsDup(mixer, pcmRoute->params); + if (!zone->params) { + SOFTMIXER_NOMEM(mixer->api); + goto fail_nodump; + } // use 1st zone channel to retrieve sound card name + channel count. |