diff options
author | dvdli <70133153+dvdli@users.noreply.github.com> | 2022-08-03 15:21:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 15:21:49 +0800 |
commit | 4fbaeef03cd1cb216e0f356c0433ca70f8b9c464 (patch) | |
tree | 016715767b297c6d096207eec817a6615c729903 /src | |
parent | 21c5bd46d5f90998661a7509c31e1fd018f9ba70 (diff) | |
parent | 563016b7fe31a8918b3db2a2f2cbb67607ecd153 (diff) |
Merge pull request #230 from rsglobal/propagate-error-message
pcm: Propagate error message to the bad_pcm in case of failure
Diffstat (limited to 'src')
-rw-r--r-- | src/pcm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1092,8 +1092,10 @@ struct pcm *pcm_open(unsigned int card, unsigned int device, } pcm->subdevice = info.subdevice; - if (pcm_set_config(pcm, config) != 0) + if (pcm_set_config(pcm, config) != 0) { + memcpy(bad_pcm.error, pcm->error, sizeof(pcm->error)); goto fail_close; + } rc = pcm_hw_mmap_status(pcm); if (rc < 0) { |