[alsa] Return ALSA the error code from buffer_write, not -1

This commit is contained in:
ejurgensen 2019-05-15 11:53:13 +02:00 committed by GitHub
parent c36df4fb8e
commit cd7bf45749
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -613,7 +613,7 @@ buffer_write(struct alsa_session *as, struct output_data *odata, snd_pcm_sframes
nsamp = BTOS(bufsize, as->quality.bits_per_sample, as->quality.channels); nsamp = BTOS(bufsize, as->quality.bits_per_sample, as->quality.channels);
ret = snd_pcm_writei(as->hdl, buf, nsamp); ret = snd_pcm_writei(as->hdl, buf, nsamp);
if (ret < 0) if (ret < 0)
return -1; return ret;
avail -= ret; avail -= ret;
} }