Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-27 03:49:55 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-09-07 16:20:53 +0400
commit8af11e51f22705f37818f0aaded8bbd24dd34aac (patch)
tree84de9d5d289fb27d227cd37be6745ffca1276b72 /libavfilter
parentf5978250524f03364c4c67f14dab86db66f7a908 (diff)
vf_scale: apply the same transform to the aspect during init that is applied per frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c8868f28e357e7e6ffe3254d0056b3e8033fe8e5)
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_scale.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index e172a2e586..ba8f9e1e82 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -232,6 +232,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: