aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-30 04:03:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-30 04:45:27 +0200
commit87bddba43b725d43767f2a387cdea0936ac1b549 (patch)
tree4e0cfb17a7760bff913f25896fa30ff73013827e /libavcodec
parent4020b009d1e88ff10abd25fb768165afa546851d (diff)
downloadffmpeg-87bddba43b725d43767f2a387cdea0936ac1b549.tar.gz
avcodec/acelp_pitch_delay: Fix runtime error: value 4.83233e+39 is outside the range of representable values of type 'float'
Fixes: 1902/clusterfuzz-testcase-minimized-4762451407011840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/acelp_pitch_delay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/acelp_pitch_delay.c b/libavcodec/acelp_pitch_delay.c
index 8ec1ba3a83..c345a99c81 100644
--- a/libavcodec/acelp_pitch_delay.c
+++ b/libavcodec/acelp_pitch_delay.c
@@ -135,7 +135,7 @@ float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy,
ff_exp10(0.05 *
(avpriv_scalarproduct_float_c(pred_table, prediction_error, 4) +
energy_mean)) /
- sqrtf(fixed_mean_energy);
+ sqrtf(fixed_mean_energy ? fixed_mean_energy : 1.0);
// update quantified prediction error energy history
memmove(&prediction_error[0], &prediction_error[1],