[codec,dsp] fix ffmpeg warnings

This commit is contained in:
Armin Novak 2024-09-02 13:38:58 +02:00
parent 6d8d4ddb1a
commit 5791b2a5aa
No known key found for this signature in database
GPG Key ID: 2CF4A2D2D3D72105

View File

@ -773,22 +773,23 @@ static BOOL freerdp_dsp_channel_mix(FREERDP_DSP_CONTEXT* WINPR_RESTRICT context,
BOOL freerdp_dsp_ffmpeg_encode(FREERDP_DSP_CONTEXT* WINPR_RESTRICT context,
const AUDIO_FORMAT* WINPR_RESTRICT format,
const BYTE* WINPR_RESTRICT data, size_t length,
const BYTE* WINPR_RESTRICT sdata, size_t length,
wStream* WINPR_RESTRICT out)
{
AUDIO_FORMAT fmt = { 0 };
if (!context || !format || !data || !out || !context->common.encoder)
if (!context || !format || !sdata || !out || !context->common.encoder)
return FALSE;
if (!context || !data || !out)
if (!context || !sdata || !out)
return FALSE;
/* https://github.com/FreeRDP/FreeRDP/issues/7607
*
* we get noisy data with channel transformation, so do it ourselves.
*/
if (!freerdp_dsp_channel_mix(context, data, length, format, &data, &length, &fmt))
const BYTE* data = NULL;
if (!freerdp_dsp_channel_mix(context, sdata, length, format, &data, &length, &fmt))
return FALSE;
/* Create input frame */