diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-12-02 23:29:49 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-12-02 23:29:49 +0100 |
commit | 225341b20de609c651e0d375a79d29c2f5540dce (patch) | |
tree | 7d7fef35598b75900223fe53864bb200146e9644 | |
parent | 00d454ed2ca3f8b4d454a837e95931afe604c53f (diff) | |
download | ffmpeg-225341b20de609c651e0d375a79d29c2f5540dce.tar.gz |
avfilter/vf_stack: always copy SAR from first input
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavfilter/vf_stack.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c index 2467302159..b2b8c68041 100644 --- a/libavfilter/vf_stack.c +++ b/libavfilter/vf_stack.c @@ -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; |