summaryrefslogtreecommitdiff
path: root/libavfilter/af_astats.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-08-18 11:03:57 +0200
committerPaul B Mahol <onemda@gmail.com>2016-08-18 15:30:05 +0200
commit703ae350c2deb43a1ab0e83d567db8948a4ae45c (patch)
tree8b1bec9cdc6a4cc38547b956568ae2c34c527b1c /libavfilter/af_astats.c
parent81f7d07608e1ac2ee480abcc4a26adb7b2dc3a78 (diff)
downloadffmpeg-703ae350c2deb43a1ab0e83d567db8948a4ae45c.tar.gz
avfilter/af_astats: fix flt(p) support
Diffstat (limited to 'libavfilter/af_astats.c')
-rw-r--r--libavfilter/af_astats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c
index 220ee782ba..e7f9675c2e 100644
--- a/libavfilter/af_astats.c
+++ b/libavfilter/af_astats.c
@@ -341,7 +341,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
const float *src = (const float *)buf->extended_data[c];
for (i = 0; i < buf->nb_samples; i++, src++)
- update_stat(s, p, *src, *src, llrint(*src * (UINT64_C(1) << 63)));
+ update_stat(s, p, *src, *src, llrint(*src * (UINT64_C(1) << 31)));
}
break;
case AV_SAMPLE_FMT_FLT: {
@@ -349,7 +349,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
for (i = 0; i < buf->nb_samples; i++) {
for (c = 0; c < channels; c++, src++)
- update_stat(s, &s->chstats[c], *src, *src / (double)INT16_MAX, llrint(*src * (UINT64_C(1) << 63)));
+ update_stat(s, &s->chstats[c], *src, *src, llrint(*src * (UINT64_C(1) << 31)));
}}
break;
case AV_SAMPLE_FMT_S64P: