[FFmpeg-cvslog] vf_scale: apply the same transform to the aspect during init that is applied per frame
Michael Niedermayer
git at videolan.org
Thu Sep 29 01:19:12 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 27 01:49:55 2011 +0200| [d33e0c6bc819048b05c168d304fba7bdd75a80e1] | committer: Anton Khirnov
vf_scale: apply the same transform to the aspect during init that is applied per frame
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d33e0c6bc819048b05c168d304fba7bdd75a80e1
---
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 5e7285c..dd2f7e1 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:
More information about the ffmpeg-cvslog
mailing list