avfilter/avf_avectorscope: fix mistake in previous commit
authorPaul B Mahol <onemda@gmail.com>
Tue, 5 Sep 2017 09:55:23 +0000 (11:55 +0200)
committerPaul B Mahol <onemda@gmail.com>
Tue, 5 Sep 2017 09:55:23 +0000 (11:55 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/avf_avectorscope.c

index b24011b..c8ff069 100644 (file)
@@ -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);
             }
             }