1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-03-04 17:51:03 +00:00

[mod_opus] coverity CID 1320733 (Result is not floating-point)

This commit is contained in:
Dragos Oancea 2023-03-23 15:06:56 +02:00
parent e479f1b648
commit 3c4695ea31

@ -1105,7 +1105,7 @@ static switch_status_t switch_opus_keep_fec_enabled(switch_codec_t *codec)
uint32_t LBRR_threshold_bitrate,LBRR_rate_thres_bps,real_target_bitrate ; uint32_t LBRR_threshold_bitrate,LBRR_rate_thres_bps,real_target_bitrate ;
opus_int32 a32,b32; opus_int32 a32,b32;
uint32_t fs = context->enc_frame_size * 1000 / (codec->implementation->microseconds_per_packet / 1000); uint32_t fs = context->enc_frame_size * 1000 / (codec->implementation->microseconds_per_packet / 1000);
float frame_rate =(float)(1000 / (codec->implementation->microseconds_per_packet / 1000)); float frame_rate =(float)(1000 / (float)(codec->implementation->microseconds_per_packet / 1000));
uint32_t step = (codec->implementation->microseconds_per_packet / 1000) != 60 ? 8000 / (codec->implementation->microseconds_per_packet / 1000 ) : 134 ; uint32_t step = (codec->implementation->microseconds_per_packet / 1000) != 60 ? 8000 / (codec->implementation->microseconds_per_packet / 1000 ) : 134 ;
opus_encoder_ctl(context->encoder_object, OPUS_GET_BITRATE(&current_bitrate)); opus_encoder_ctl(context->encoder_object, OPUS_GET_BITRATE(&current_bitrate));