From a5e6cd79ec343937129c17747447ba37d006859b Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 5 Sep 2017 11:55:23 +0200 Subject: [PATCH] avfilter/avf_avectorscope: fix mistake in previous commit Signed-off-by: Paul B Mahol --- libavfilter/avf_avectorscope.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index b24011bd66..c8ff0698e3 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avectorscope.c @@ -269,9 +269,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) } break; case AV_SAMPLE_FMT_FLT: { - float *samples = (float *)insamples->data[0] + i * 2; + float *samples = (float *)insamples->data[0]; - for (i = 0; i < insamples->nb_samples; i++) { + for (i = 0; i < insamples->nb_samples * 2; i++) { max = FFMAX(FFABS(samples[i]), max); } }