[FFmpeg-devel] [PATCH] avcodec/wmavoice: use av_clipd for double values
Kacper Michajłow
kasper93 at gmail.com
Wed Jul 10 18:28:48 EEST 2024
Fixes Clang warning.
Signed-off-by: Kacper Michajłow <kasper93 at gmail.com>
---
libavcodec/wmavoice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 258c71330c..3db73773b7 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -655,7 +655,7 @@ static void calc_input_response(WMAVoiceContext *s, float *lpcs_src,
lpcs[n] = angle_mul * pwr;
/* 70.57 =~ 1/log10(1.0331663) */
- idx = av_clipf((pwr * gain_mul - 0.0295) * 70.570526123, 0, INT_MAX / 2);
+ idx = av_clipd((pwr * gain_mul - 0.0295) * 70.570526123, 0, INT_MAX / 2);
if (idx > 127) { // fall back if index falls outside table range
coeffs[n] = wmavoice_energy_table[127] *
--
2.43.0
More information about the ffmpeg-devel
mailing list