diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-27 01:49:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-08-27 02:04:37 +0200 |
commit | c8868f28e357e7e6ffe3254d0056b3e8033fe8e5 (patch) | |
tree | d1708da7f1e3139aedaf8e13bb3b865a76f0693c | |
parent | 1287c81d65873bac2e2d062da8684f987ae54c4b (diff) | |
download | ffmpeg-c8868f28e357e7e6ffe3254d0056b3e8033fe8e5.tar.gz |
vf_scale: apply the same transform to the aspect during init that is applied per frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/vf_scale.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 044b2843bc..5cc9e9e710 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -240,6 +240,11 @@ 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: |