diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-09-08 22:11:06 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-09-08 22:13:26 +0200 |
commit | 3df55c7bd6c4a101b3baa7933415db016be63f45 (patch) | |
tree | 749a2a1c4a520402fa1e6ef8bc0162882e22ac45 /libavfilter/af_speechnorm.c | |
parent | 5db1e07a62e29da4c212a4a4536c570d06f3d102 (diff) | |
download | ffmpeg-3df55c7bd6c4a101b3baa7933415db016be63f45.tar.gz |
avfilter/af_speechnorm: add timeline support
Diffstat (limited to 'libavfilter/af_speechnorm.c')
-rw-r--r-- | libavfilter/af_speechnorm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/af_speechnorm.c b/libavfilter/af_speechnorm.c index fa56276e1d..35f8fe81a1 100644 --- a/libavfilter/af_speechnorm.c +++ b/libavfilter/af_speechnorm.c @@ -315,7 +315,7 @@ static void filter_channels_## name (AVFilterContext *ctx, av_assert0(size > 0); \ gain = cc->gain_state; \ consume_pi(cc, size); \ - for (int i = n; i < n + size; i++) \ + for (int i = n; !ctx->is_disabled && i < n + size; i++) \ dst[i] *= gain; \ n += size; \ } \ @@ -375,7 +375,7 @@ static void filter_link_channels_## name (AVFilterContext *ctx, if (cc->bypass) \ continue; \ \ - for (int i = n; i < n + min_size; i++) { \ + for (int i = n; !ctx->is_disabled && i < n + min_size; i++) { \ ptype g = tlerp(s->prev_gain, gain, (i - n) / (ptype)min_size); \ dst[i] *= g; \ } \ @@ -568,5 +568,6 @@ const AVFilter ff_af_speechnorm = { .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = process_command, }; |