diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-27 03:49:55 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-09-28 10:08:30 +0400 |
commit | d33e0c6bc819048b05c168d304fba7bdd75a80e1 (patch) | |
tree | a8affb42131b80eb3d6e504cc4534a99396fce1f /libavfilter/vf_scale.c | |
parent | 80de930a781c177dc54f3836f57aa8959597bcda (diff) |
vf_scale: apply the same transform to the aspect during init that is applied per frame
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavfilter/vf_scale.c')
-rw-r--r-- | libavfilter/vf_scale.c | 8 |
1 files changed, 8 insertions, 0 deletions
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: |