mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avfilter/af_amerge: use already provided outlink
This commit is contained in:
parent
c979ccdfd7
commit
8b9c400f1d
@ -156,7 +156,7 @@ static int config_output(AVFilterLink *outlink)
|
||||
char buf[128];
|
||||
int i;
|
||||
|
||||
s->bps = av_get_bytes_per_sample(ctx->outputs[0]->format);
|
||||
s->bps = av_get_bytes_per_sample(outlink->format);
|
||||
outlink->time_base = ctx->inputs[0]->time_base;
|
||||
|
||||
av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
|
||||
@ -166,7 +166,7 @@ static int config_output(AVFilterLink *outlink)
|
||||
av_bprintf(&bp, "%s", buf);
|
||||
}
|
||||
av_bprintf(&bp, " -> out:");
|
||||
av_channel_layout_describe(&ctx->outputs[0]->ch_layout, buf, sizeof(buf));
|
||||
av_channel_layout_describe(&outlink->ch_layout, buf, sizeof(buf));
|
||||
av_bprintf(&bp, "%s", buf);
|
||||
av_log(ctx, AV_LOG_VERBOSE, "%s\n", bp.str);
|
||||
|
||||
@ -234,7 +234,7 @@ static int try_push_frame(AVFilterContext *ctx, int nb_samples)
|
||||
ins[i] = inbuf[i]->data[0];
|
||||
}
|
||||
|
||||
outbuf = ff_get_audio_buffer(ctx->outputs[0], nb_samples);
|
||||
outbuf = ff_get_audio_buffer(outlink, nb_samples);
|
||||
if (!outbuf) {
|
||||
free_frames(s->nb_inputs, inbuf);
|
||||
return AVERROR(ENOMEM);
|
||||
@ -279,7 +279,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
|
||||
free_frames(s->nb_inputs, inbuf);
|
||||
return ff_filter_frame(ctx->outputs[0], outbuf);
|
||||
return ff_filter_frame(outlink, outbuf);
|
||||
}
|
||||
|
||||
static int activate(AVFilterContext *ctx)
|
||||
|
Loading…
x
Reference in New Issue
Block a user