diff options
author | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-09-07 16:13:55 +0200 |
---|---|---|
committer | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-09-07 16:13:55 +0200 |
commit | 9c0aa9f3073a37e961a90a973b8d007685c9e184 (patch) | |
tree | 7b4f9778a75958cff3c04b71af303992505629b2 /plugins/alsa/alsa-core-pcm.c | |
parent | 168e9288f1ff147d9aaa6064c3cc0308fd214a6a (diff) |
fixed crash upon misconfiguration of capture/playback devices
The null pcmplug case was not correctly handled in various places.
Also fixed some typos in the log
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-core-pcm.c')
-rw-r--r-- | plugins/alsa/alsa-core-pcm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/alsa/alsa-core-pcm.c b/plugins/alsa/alsa-core-pcm.c index 50e1384..1205a81 100644 --- a/plugins/alsa/alsa-core-pcm.c +++ b/plugins/alsa/alsa-core-pcm.c @@ -781,15 +781,15 @@ PUBLIC int AlsaPcmCopy(SoftMixerT *mixer, AlsaStreamAudioT *stream, AlsaPcmCtlT /// start a thread for writing if ((error = pthread_create(&cHandle->wthread, NULL, &readThreadEntry, cHandle)) < 0) { AFB_ApiError(mixer->api, - "%s Fail create waiting thread pcmIn=%s err=%d", - __func__, ALSA_PCM_UID(pcmIn->handle, string), error); + "%s Fail create write thread pcmOut=%s err=%d", + __func__, ALSA_PCM_UID(pcmOut->handle, string), error); goto OnErrorExit; } // start a thread for reading if ((error = pthread_create(&cHandle->rthread, NULL, &writeThreadEntry, cHandle)) < 0) { AFB_ApiError(mixer->api, - "%s Fail create waiting thread pcmIn=%s err=%d", + "%s Fail create read thread pcmIn=%s err=%d", __func__, ALSA_PCM_UID(pcmIn->handle, string), error); goto OnErrorExit; } @@ -809,7 +809,7 @@ PUBLIC int AlsaPcmCopy(SoftMixerT *mixer, AlsaStreamAudioT *stream, AlsaPcmCtlT if (error) { AFB_ApiWarning(mixer->api, "%s: Failed to increase stream write thread priority pcmIn=%s err=%s", - __func__, ALSA_PCM_UID(pcmIn->handle, string), strerror(error)); + __func__, ALSA_PCM_UID(pcmOut->handle, string), strerror(error)); } return 0; |