Alsa: Fix handling of poll descriptors in PaAlsaStream_WaitForFrames(). Otherwise if capture signals before playback a duplex stream could poll the wrong descriptor, causing a loop (reported by Alexander Kartashov).
This commit is contained in:
parent
2a992efaa8
commit
b1a62661bf
1 changed files with 2 additions and 1 deletions
|
|
@ -3770,7 +3770,8 @@ static PaError PaAlsaStream_WaitForFrames( PaAlsaStream *self, unsigned long *fr
|
|||
}
|
||||
if( pollPlayback )
|
||||
{
|
||||
playbackPfds = self->pfds + (self->capture.pcm ? self->capture.nfds : 0);
|
||||
/* self->pfds is in effect an array of fds; if necessary, index past the capture fds */
|
||||
playbackPfds = self->pfds + (pollCapture ? self->capture.nfds : 0);
|
||||
PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->playback, playbackPfds ) );
|
||||
totalFds += self->playback.nfds;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue