summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyan Doshi <[email protected]>2025-10-20 13:09:15 +0530
committerJames Almer <[email protected]>2025-10-21 13:22:08 +0000
commit535d4047d34a08aa7fd9d2ddefa379bbfb233eb8 (patch)
tree66dfdcfe04eda1ac694512f6f882a59240ac2c70
parentedf5b777c9e0a7157351704d8b44d7ee32167446 (diff)
ffmpeg: unbreak max_error_rate application
The calculation of decode error rate neglected to cast its operands to float, thus always leading to a value of 0.
-rw-r--r--fftools/ffmpeg_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c
index 66c58c1c3c..2f25265997 100644
--- a/fftools/ffmpeg_dec.c
+++ b/fftools/ffmpeg_dec.c
@@ -1007,7 +1007,7 @@ static int decoder_thread(void *arg)
ret = 0;
err_rate = (dp->dec.frames_decoded || dp->dec.decode_errors) ?
- dp->dec.decode_errors / (dp->dec.frames_decoded + dp->dec.decode_errors) : 0.f;
+ (float)dp->dec.decode_errors / (dp->dec.frames_decoded + dp->dec.decode_errors) : 0.f;
if (err_rate > max_error_rate) {
av_log(dp, AV_LOG_FATAL, "Decode error rate %g exceeds maximum %g\n",
err_rate, max_error_rate);