aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-27 01:49:55 +0200
committerReinhard Tartler <siretart@tauware.de>2012-02-08 14:38:31 +0100
commit7f62cf120bd066964d93617c73bd5f9f2ee9de00 (patch)
tree8cfaba0d42f6eb7236d4a81df5bfa4fa00886229
parentaf58dd479859001808a9b7c085e1d271b8e8962b (diff)
downloadffmpeg-7f62cf120bd066964d93617c73bd5f9f2ee9de00.tar.gz
vf_scale: apply the same transform to the aspect during init that is applied per frame
Signed-off-by: Anton Khirnov <anton@khirnov.net> (cherry picked from commit d33e0c6bc819048b05c168d304fba7bdd75a80e1) Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavfilter/vf_scale.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 5288d32116..bbc8321c01 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -213,6 +213,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: