aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-05-22 14:14:15 +0200
committerPaul B Mahol <onemda@gmail.com>2020-05-22 14:14:15 +0200
commitca7095a9072fab4cdb41af12da9d94752e082e34 (patch)
tree3b4b93f884658c2efacd0e12e149e28d416866d1
parent8c825e43f80b1c2faa417f42e0595b5887226367 (diff)
downloadffmpeg-ca7095a9072fab4cdb41af12da9d94752e082e34.tar.gz
avfilter/af_aiir: move response drawing as last step
-rw-r--r--libavfilter/af_aiir.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c
index bacdab6088..92ff348dd6 100644
--- a/libavfilter/af_aiir.c
+++ b/libavfilter/af_aiir.c
@@ -1001,15 +1001,6 @@ static int config_output(AVFilterLink *outlink)
check_stability(ctx, inlink->channels);
}
- av_frame_free(&s->video);
- if (s->response) {
- s->video = ff_get_video_buffer(ctx->outputs[1], s->w, s->h);
- if (!s->video)
- return AVERROR(ENOMEM);
-
- draw_response(ctx, s->video, inlink->sample_rate);
- }
-
if (s->format == 0)
av_log(ctx, AV_LOG_WARNING, "tf coefficients format is not recommended for too high number of zeros/poles.\n");
@@ -1053,6 +1044,15 @@ static int config_output(AVFilterLink *outlink)
case AV_SAMPLE_FMT_S16P: s->iir_channel = s->process == 1 ? iir_ch_serial_s16p : iir_ch_s16p; break;
}
+ av_frame_free(&s->video);
+ if (s->response) {
+ s->video = ff_get_video_buffer(ctx->outputs[1], s->w, s->h);
+ if (!s->video)
+ return AVERROR(ENOMEM);
+
+ draw_response(ctx, s->video, inlink->sample_rate);
+ }
+
return 0;
}