Merge pull request #4774 from akallabeth/audin_leak_fix
Fixed leak in audio format processing.
This commit is contained in:
commit
70b3e442ee
@ -255,14 +255,13 @@ static UINT audin_process_formats(AUDIN_PLUGIN* audin, AUDIN_CHANNEL_CALLBACK* c
|
||||
rdpsnd_get_audio_tag_string(format.wFormatTag), format.nChannels, format.nSamplesPerSec,
|
||||
format.nBlockAlign, format.wBitsPerSample, format.cbSize);
|
||||
|
||||
if (audin->fixed_format > 0 && audin->fixed_format != format.wFormatTag)
|
||||
continue;
|
||||
|
||||
if (audin->fixed_channel > 0 && audin->fixed_channel != format.nChannels)
|
||||
continue;
|
||||
|
||||
if (audin->fixed_rate > 0 && audin->fixed_rate != format.nSamplesPerSec)
|
||||
if ((audin->fixed_format > 0 && audin->fixed_format != format.wFormatTag) ||
|
||||
(audin->fixed_channel > 0 && audin->fixed_channel != format.nChannels) ||
|
||||
(audin->fixed_rate > 0 && audin->fixed_rate != format.nSamplesPerSec))
|
||||
{
|
||||
free(format.data);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (freerdp_dsp_supports_format(&format, TRUE) ||
|
||||
audin->device->FormatSupported(audin->device, &format))
|
||||
|
@ -355,7 +355,7 @@ BOOL rdp_client_disconnect_and_clear(rdpRdp* rdp)
|
||||
|
||||
static BOOL rdp_client_reconnect_channels(rdpRdp* rdp, BOOL redirect)
|
||||
{
|
||||
BOOL status;
|
||||
BOOL status = FALSE;
|
||||
rdpContext* context;
|
||||
rdpChannels* channels;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user