]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_opus] coverity CID 1320733 (Result is not floating-point) 2005/head
authorDragos Oancea <dragos@signalwire.com>
Thu, 23 Mar 2023 13:06:56 +0000 (15:06 +0200)
committerDragos Oancea <dragos@signalwire.com>
Wed, 29 Mar 2023 14:18:57 +0000 (17:18 +0300)
src/mod/codecs/mod_opus/mod_opus.c

index a90aba346a2353fa1ad274b93c428e37f616774c..d24590f37a0c68f15a190adbc0a067f46f65667f 100644 (file)
@@ -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 ;
        opus_int32 a32,b32;
        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 ;
 
        opus_encoder_ctl(context->encoder_object, OPUS_GET_BITRATE(&current_bitrate));