]> git.alsa-project.org Git - alsa-lib.git/commit
pcm_file: in case of failed write clear file buffer variables
authorAdam Miartus <amiartus@de.adit-jv.com>
Mon, 1 Jul 2019 13:25:18 +0000 (15:25 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 3 Jul 2019 12:23:03 +0000 (14:23 +0200)
commitde1a9b2e81c1b0436ce790f6d6f894a6d2311055
tree4191703aa8f60e4f3d792395f5410d294624306a
parent61b0f8f3f25d620ae54c9b1d641e34ce84706504
pcm_file: in case of failed write clear file buffer variables

previously, in case of failed write to output file, error is returned
from snd_pcm_writei/read APIs, user could run pcm_drain as fallback and
encounter an assert, since drain would try to write remaining file
buffer to a file

if failed to write to output file in first place, it makes sense to clear
current internal pmc_file file buffer variables

Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
Reviewed-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_file.c