Browse Source

vf_scale: apply the same transform to the aspect during init that is applied per frame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Michael Niedermayer 13 years ago
parent
commit
c8868f28e3
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavfilter/vf_scale.c

+ 5
- 0
libavfilter/vf_scale.c View File

@@ -240,6 +240,11 @@ static int config_props(AVFilterLink *outlink)
if (!scale->sws) if (!scale->sws)
return AVERROR(EINVAL); 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; return 0;


fail: fail:


Loading…
Cancel
Save