[FFmpeg-devel] [PATCH] avfilter/af_ashowinfo: fix scaling factor of replaygain peak values

Kacper Michajłow kasper93 at gmail.com
Wed Dec 4 22:26:04 EET 2024


Fixes: 8542f9c4f17125d483c40c0c5723842f1c982f81
Signed-off-by: Kacper Michajłow <kasper93 at gmail.com>
---
 libavfilter/af_ashowinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c
index b83847b866..de94d4c7c2 100644
--- a/libavfilter/af_ashowinfo.c
+++ b/libavfilter/af_ashowinfo.c
@@ -120,7 +120,7 @@ static void print_peak(AVFilterContext *ctx, const char *str, uint32_t peak)
     if (!peak)
         av_log(ctx, AV_LOG_INFO, "unknown");
     else
-        av_log(ctx, AV_LOG_INFO, "%f", (float)peak / UINT32_MAX);
+        av_log(ctx, AV_LOG_INFO, "%f", peak / 100000.0f);
     av_log(ctx, AV_LOG_INFO, ", ");
 }
 
-- 
2.45.1



More information about the ffmpeg-devel mailing list