diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 5e7285cda8..dd2f7e18a5 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -218,6 +218,14 @@ static int config_props(AVFilterLink *outlink) if (!scale->sws) return AVERROR(EINVAL); + + if (inlink->sample_aspect_ratio.num) + outlink->sample_aspect_ratio = av_mul_q((AVRational){outlink->h*inlink->w, + outlink->w*inlink->h}, + inlink->sample_aspect_ratio); + else + outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; + return 0; fail: