]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_compand.c
avcodec: postpone removal of deprecated libopenh264 wrapper options
[ffmpeg] / libavfilter / af_compand.c
index c138f0b1d8f97c516348da3f947f2d48c17ced53..1e75be4f41e95e77f76ab885970f6ee7ec2ccc92 100644 (file)
@@ -349,9 +349,10 @@ static int config_output(AVFilterLink *outlink)
     }
 
     if (nb_attacks > channels || nb_decays > channels) {
-        av_log(ctx, AV_LOG_ERROR,
-                "Number of attacks/decays bigger than number of channels.\n");
-        return AVERROR(EINVAL);
+        av_log(ctx, AV_LOG_WARNING,
+                "Number of attacks/decays bigger than number of channels. Ignoring rest of entries.\n");
+        nb_attacks = FFMIN(nb_attacks, channels);
+        nb_decays  = FFMIN(nb_decays, channels);
     }
 
     uninit(ctx);
@@ -534,7 +535,7 @@ static int config_output(AVFilterLink *outlink)
     s->delay_frame->nb_samples     = s->delay_samples;
     s->delay_frame->channel_layout = outlink->channel_layout;
 
-    err = av_frame_get_buffer(s->delay_frame, 32);
+    err = av_frame_get_buffer(s->delay_frame, 0);
     if (err)
         return err;