avfilter: pass outlink to ff_get_audio_buffer()

This is more correct.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pull/274/head
Paul B Mahol 7 years ago
parent 677701c6b3
commit 88cbd25b19
  1. 2
      libavfilter/af_acontrast.c
  2. 2
      libavfilter/af_adelay.c
  3. 2
      libavfilter/af_aecho.c
  4. 2
      libavfilter/af_aemphasis.c
  5. 2
      libavfilter/af_afade.c
  6. 2
      libavfilter/af_agate.c
  7. 2
      libavfilter/af_alimiter.c
  8. 2
      libavfilter/af_aphaser.c
  9. 2
      libavfilter/af_biquads.c
  10. 2
      libavfilter/af_bs2b.c
  11. 2
      libavfilter/af_chorus.c
  12. 4
      libavfilter/af_compand.c
  13. 2
      libavfilter/af_compensationdelay.c
  14. 2
      libavfilter/af_crossfeed.c
  15. 2
      libavfilter/af_earwax.c
  16. 2
      libavfilter/af_extrastereo.c
  17. 2
      libavfilter/af_flanger.c
  18. 2
      libavfilter/af_haas.c
  19. 2
      libavfilter/af_loudnorm.c
  20. 2
      libavfilter/af_replaygain.c
  21. 4
      libavfilter/af_rubberband.c
  22. 2
      libavfilter/af_sidechaincompress.c
  23. 2
      libavfilter/af_stereotools.c
  24. 2
      libavfilter/af_stereowiden.c
  25. 2
      libavfilter/af_tremolo.c
  26. 2
      libavfilter/af_vibrato.c
  27. 2
      libavfilter/af_volume.c

@ -173,7 +173,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -192,7 +192,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
if (ctx->is_disabled || !s->delays)
return ff_filter_frame(ctx->outputs[0], frame);
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);

@ -279,7 +279,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);

@ -96,7 +96,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -282,7 +282,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
if (av_frame_is_writable(buf)) {
out_buf = buf;
} else {
out_buf = ff_get_audio_buffer(inlink, nb_samples);
out_buf = ff_get_audio_buffer(outlink, nb_samples);
if (!out_buf)
return AVERROR(ENOMEM);
av_frame_copy_props(out_buf, buf);

@ -214,7 +214,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -135,7 +135,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -247,7 +247,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inbuf)
if (av_frame_is_writable(inbuf)) {
outbuf = inbuf;
} else {
outbuf = ff_get_audio_buffer(inlink, inbuf->nb_samples);
outbuf = ff_get_audio_buffer(outlink, inbuf->nb_samples);
if (!outbuf) {
av_frame_free(&inbuf);
return AVERROR(ENOMEM);

@ -417,7 +417,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
if (av_frame_is_writable(buf)) {
out_buf = buf;
} else {
out_buf = ff_get_audio_buffer(inlink, nb_samples);
out_buf = ff_get_audio_buffer(outlink, nb_samples);
if (!out_buf) {
av_frame_free(&buf);
return AVERROR(ENOMEM);

@ -135,7 +135,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(outlink, frame->nb_samples);
if (!out_frame) {
av_frame_free(&frame);
return AVERROR(ENOMEM);

@ -247,7 +247,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);

@ -185,7 +185,7 @@ static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame)
if (av_frame_is_writable(frame)) {
out_frame = frame;
} else {
out_frame = ff_get_audio_buffer(inlink, nb_samples);
out_frame = ff_get_audio_buffer(ctx->outputs[0], nb_samples);
if (!out_frame) {
av_frame_free(&frame);
return AVERROR(ENOMEM);
@ -249,7 +249,7 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
if (count >= s->delay_samples) {
if (!out_frame) {
out_frame = ff_get_audio_buffer(inlink, nb_samples - i);
out_frame = ff_get_audio_buffer(ctx->outputs[0], nb_samples - i);
if (!out_frame) {
av_frame_free(&frame);
return AVERROR(ENOMEM);

@ -131,7 +131,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFrame *out;
int n, ch;
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(ctx->outputs[0], in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -99,7 +99,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -115,7 +115,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
{
AVFilterLink *outlink = inlink->dst->outputs[0];
int16_t *taps, *endin, *in, *out;
AVFrame *outsamples = ff_get_audio_buffer(inlink, insamples->nb_samples);
AVFrame *outsamples = ff_get_audio_buffer(outlink, insamples->nb_samples);
int len;
if (!outsamples) {

@ -71,7 +71,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -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);

@ -144,7 +144,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -423,7 +423,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -554,7 +554,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
uint32_t level;
AVFrame *out;
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -128,7 +128,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
nb_samples = rubberband_available(s->rbs);
if (nb_samples > 0) {
out = ff_get_audio_buffer(inlink, nb_samples);
out = ff_get_audio_buffer(outlink, nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);
@ -187,7 +187,7 @@ static int request_frame(AVFilterLink *outlink)
nb_samples = rubberband_available(s->rbs);
if (nb_samples > 0) {
out = ff_get_audio_buffer(inlink, nb_samples);
out = ff_get_audio_buffer(outlink, nb_samples);
if (!out)
return AVERROR(ENOMEM);
out->pts = av_rescale_q(s->nb_samples_out,

@ -367,7 +367,7 @@ static int acompressor_filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -166,7 +166,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -98,7 +98,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -57,7 +57,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -63,7 +63,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (av_frame_is_writable(in)) {
out = in;
} else {
out = ff_get_audio_buffer(inlink, in->nb_samples);
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);

@ -410,7 +410,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
&& (vol->precision != PRECISION_FIXED || vol->volume_i > 0)) {
out_buf = buf;
} else {
out_buf = ff_get_audio_buffer(inlink, nb_samples);
out_buf = ff_get_audio_buffer(outlink, nb_samples);
if (!out_buf) {
av_frame_free(&buf);
return AVERROR(ENOMEM);

Loading…
Cancel
Save