pulsesrc: fix checking for invalid stream index
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 5 Jan 2019 19:10:46 +0000 (23:10 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 7 Jan 2019 07:54:24 +0000 (11:54 +0400)
commit8b155d71884156f15bdd97d30ea208f3e095c684
tree602afaad04c3f82f9f151c096dab27d2dcf4d1c6
parentec931601a61413fb40b437b78c1382fd4c61a8f5
pulsesrc: fix checking for invalid stream index

PA_INVALID_INDEX, the default value, is unfortunately !0.

Setting the volume before the stream is created will put the ring
buffer in error state. Unfortunately, that's what spice-gtk does.
ext/pulse/pulsesrc.c