]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: meter / s16 - add protection for the maximum copied frames
authorJaroslav Kysela <perex@perex.cz>
Tue, 13 Oct 2020 17:28:29 +0000 (19:28 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 13 Oct 2020 17:31:49 +0000 (19:31 +0200)
commita6c8ac0c85ca1b16684a687c7000c73aa38b7776
treea1484afc5983c6f834cc234d72317e5991eaffdb
parentaa89ad93623fc97fed6f99370a97c9c3eee1d6fd
pcm: meter / s16 - add protection for the maximum copied frames

The rewind or forward may cause the stream pointer change. Although
this patch does not fix the real meter update issue, it breaks
the possible big loops when the stream pointers are desynced with
the meters. It does not make sense to copy more samples than the
pcm buffer contains.

Link: https://lore.kernel.org/alsa-devel/f56d6a67-014a-e562-c253-830c0ec03717@ivitera.com/
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_meter.c