diff options
author | Ricardo Biehl Pasquali <pasqualirb@gmail.com> | 2019-01-07 11:54:47 -0200 |
---|---|---|
committer | Ricardo Biehl Pasquali <pasqualirb@gmail.com> | 2019-01-08 16:48:19 -0200 |
commit | b38b6a670c359e497926d799cea4d9c80d561eab (patch) | |
tree | deb4ac39015e5686f6765d5d8b7ea6e5dc15b26f | |
parent | 0bfac896e66548130c763d015ac16347ced95b84 (diff) |
pcm: Check for error after setting appl_ptr
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
-rw-r--r-- | src/pcm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -993,7 +993,8 @@ int pcm_prepare(struct pcm *pcm) int pcm_start(struct pcm *pcm) { /* set appl_ptr and avail_min in kernel */ - pcm_sync_ptr(pcm, 0); + if (pcm_sync_ptr(pcm, 0) < 0) + return -1; if (pcm->mmap_status->state != PCM_STATE_RUNNING) { if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_START) < 0) |