Commit ca7095a9 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_aiir: move response drawing as last step

parent 8c825e43
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment