alsa: Use 8 bit pointer type for byte-based pointer arithmetic
authorSebastian Dröge <sebastian@centricular.com>
Tue, 13 Oct 2015 21:32:11 +0000 (00:32 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 17 Oct 2015 08:02:44 +0000 (11:02 +0300)
commit18abd0295f09f1630ba52d820e83fce279984f3a
tree82367fb32ef5b654260d32e9d01ef28438dd8111
parent7037f25bba7aebfa16dced3a115952ef2b444b10
alsa: Use 8 bit pointer type for byte-based pointer arithmetic

Usually these loops only run once, so there's no problem here. But sometimes
they run twice, and by adding the number of bytes to a 16 bit pointer type we
would advance twice as much as we should.

Also use snd_pcm_frames_to_bytes() in alsasrc to calculate
the number of bytes to skip, same as we do in alsasink.

Thanks to Lucio A. Hernandez <lucio.a.hernandez@gmail.com> for reporting.
ext/alsa/gstalsasink.c
ext/alsa/gstalsasrc.c