mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avfilter/vf_stack: always copy SAR from first input
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
00d454ed2c
commit
225341b20d
@ -105,6 +105,7 @@ static int process_frame(FFFrameSync *fs)
|
||||
if (!out)
|
||||
return AVERROR(ENOMEM);
|
||||
out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
|
||||
out->sample_aspect_ratio = outlink->sample_aspect_ratio;
|
||||
|
||||
for (i = 0; i < s->nb_inputs; i++) {
|
||||
AVFilterLink *inlink = ctx->inputs[i];
|
||||
@ -147,6 +148,7 @@ static int config_output(AVFilterLink *outlink)
|
||||
StackContext *s = ctx->priv;
|
||||
AVRational time_base = ctx->inputs[0]->time_base;
|
||||
AVRational frame_rate = ctx->inputs[0]->frame_rate;
|
||||
AVRational sar = ctx->inputs[0]->sample_aspect_ratio;
|
||||
int height = ctx->inputs[0]->h;
|
||||
int width = ctx->inputs[0]->w;
|
||||
FFFrameSyncIn *in;
|
||||
@ -179,6 +181,7 @@ static int config_output(AVFilterLink *outlink)
|
||||
outlink->h = height;
|
||||
outlink->time_base = time_base;
|
||||
outlink->frame_rate = frame_rate;
|
||||
outlink->sample_aspect_ratio = sar;
|
||||
|
||||
if ((ret = ff_framesync_init(&s->fs, ctx, s->nb_inputs)) < 0)
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user