]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_flanger.c
avfilter/af_tremolo: make sure table size is at least 1
[ffmpeg] / libavfilter / af_flanger.c
index a92367c97a3913906b8349478972ba5888c5ee86..33c8245ea55892cce13f22285fd1a33cbb9f2c79 100644 (file)
@@ -72,7 +72,7 @@ static const AVOption flanger_options[] = {
 
 AVFILTER_DEFINE_CLASS(flanger);
 
-static int init(AVFilterContext *ctx)
+static av_cold int init(AVFilterContext *ctx)
 {
     FlangerContext *s = ctx->priv;
 
@@ -148,7 +148,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
     if (av_frame_is_writable(frame)) {
         out_frame = frame;
     } else {
-        out_frame = ff_get_audio_buffer(inlink, frame->nb_samples);
+        out_frame = ff_get_audio_buffer(ctx->outputs[0], frame->nb_samples);
         if (!out_frame) {
             av_frame_free(&frame);
             return AVERROR(ENOMEM);