summaryrefslogtreecommitdiff
path: root/libavfilter/vf_scale.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_scale.c')
-rw-r--r--libavfilter/vf_scale.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 096397f8aa..c47c6f3bc9 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -163,9 +163,10 @@ static int config_props(AVFilterLink *outlink)
var_values[VAR_IN_H] = var_values[VAR_IH] = inlink->h;
var_values[VAR_OUT_W] = var_values[VAR_OW] = NAN;
var_values[VAR_OUT_H] = var_values[VAR_OH] = NAN;
- var_values[VAR_DAR] = var_values[VAR_A] = (double) inlink->w / inlink->h;
+ var_values[VAR_A] = (double) inlink->w / inlink->h;
var_values[VAR_SAR] = inlink->sample_aspect_ratio.num ?
(double) inlink->sample_aspect_ratio.num / inlink->sample_aspect_ratio.den : 1;
+ var_values[VAR_DAR] = var_values[VAR_A] * var_values[VAR_SAR];
var_values[VAR_HSUB] = 1 << desc->log2_chroma_w;
var_values[VAR_VSUB] = 1 << desc->log2_chroma_h;