Browse Source

wasapi: fixed crash on NULL

mr/6794444/5dec767af1c35d1eb1422b51b477d7a0b18acdf3
dmitrykos 1 year ago
parent
commit
5dec767af1
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/hostapi/wasapi/pa_win_wasapi.c

+ 1
- 1
src/hostapi/wasapi/pa_win_wasapi.c View File

@@ -2462,7 +2462,7 @@ static PaError GetClosestFormat(IAudioClient *client, double sampleRate, const P
WAVEFORMATEX *sharedClosestMatch = NULL;
HRESULT hr = !S_OK;
PaStreamParameters params = (*_params);
const BOOL explicitFormat = ((streamInfo->flags & paWinWasapiExplicitSampleFormat) == paWinWasapiExplicitSampleFormat);
const BOOL explicitFormat = (streamInfo != NULL) && ((streamInfo->flags & paWinWasapiExplicitSampleFormat) == paWinWasapiExplicitSampleFormat);
(void)output;

/* It was not noticed that 24-bit Input producing no output while device accepts this format.

Loading…
Cancel
Save