diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-01-18 19:38:14 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-01-18 19:38:14 +0100 |
commit | 4e17efd852bd3d83d1b6465614fc2d44be8e3e3d (patch) | |
tree | 85ad2ef58b06787390b1a04d823aa44c7b7652f8 /libavfilter/avf_showfreqs.c | |
parent | 0f88b3f82fafd536979993aeaafcb11a22266dbd (diff) | |
download | ffmpeg-4e17efd852bd3d83d1b6465614fc2d44be8e3e3d.tar.gz |
avfilter/avf_showfreqs/showspectrum: rename skip_samples to hop_size
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/avf_showfreqs.c')
-rw-r--r-- | libavfilter/avf_showfreqs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c index 311dd478bd..632388753c 100644 --- a/libavfilter/avf_showfreqs.c +++ b/libavfilter/avf_showfreqs.c @@ -53,7 +53,7 @@ typedef struct ShowFreqsContext { float **avg_data; float *window_func_lut; float overlap; - int skip_samples; + int hop_size; int nb_channels; int nb_freq; int win_size; @@ -205,8 +205,8 @@ static int config_output(AVFilterLink *outlink) ff_generate_window_func(s->window_func_lut, s->win_size, s->win_func, &overlap); if (s->overlap == 1.) s->overlap = overlap; - s->skip_samples = (1. - s->overlap) * s->win_size; - if (s->skip_samples < 1) { + s->hop_size = (1. - s->overlap) * s->win_size; + if (s->hop_size < 1) { av_log(ctx, AV_LOG_ERROR, "overlap %f too big\n", s->overlap); return AVERROR(EINVAL); } @@ -434,14 +434,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) } fin->pts = s->pts; - s->pts += s->skip_samples; + s->pts += s->hop_size; ret = av_audio_fifo_peek(s->fifo, (void **)fin->extended_data, s->win_size); if (ret < 0) goto fail; ret = plot_freqs(inlink, fin); av_frame_free(&fin); - av_audio_fifo_drain(s->fifo, s->skip_samples); + av_audio_fifo_drain(s->fifo, s->hop_size); if (ret < 0) goto fail; } |