Don't crash for alsa_snd_pcm_poll_descriptors fail in another case
This commit is contained in:
parent
b37657be70
commit
8f63b51808
1 changed files with 7 additions and 2 deletions
|
|
@ -3805,14 +3805,19 @@ static PaError PaAlsaStream_WaitForFrames( PaAlsaStream *self, unsigned long *fr
|
|||
if( pollCapture )
|
||||
{
|
||||
capturePfds = self->pfds;
|
||||
PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->capture, capturePfds ) );
|
||||
PaError res = PaAlsaStreamComponent_BeginPolling( &self->capture, capturePfds );
|
||||
if( res != paNoError)
|
||||
{
|
||||
xrun = 1;
|
||||
goto end;
|
||||
}
|
||||
totalFds += self->capture.nfds;
|
||||
}
|
||||
if( pollPlayback )
|
||||
{
|
||||
/* self->pfds is in effect an array of fds; if necessary, index past the capture fds */
|
||||
playbackPfds = self->pfds + (pollCapture ? self->capture.nfds : 0);
|
||||
int res = PaAlsaStreamComponent_BeginPolling( &self->playback, playbackPfds );
|
||||
PaError res = PaAlsaStreamComponent_BeginPolling( &self->playback, playbackPfds );
|
||||
if( res != paNoError)
|
||||
{
|
||||
xrun = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue