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:
authorRudolf Polzer <divVerent@xonotic.org>2013-11-02 14:57:25 +0400
committerAnton Khirnov <anton@khirnov.net>2013-11-03 00:16:29 +0400
commit3a14b160bd442794c6a16a6a883adb547550e847 (patch)
treee33243799e69e79eb14bc3dd7ef785e6bf09abac /libavfilter
parent34a0ac41a880039c7fb4b3abce10d8e2ce48fac7 (diff)
vf_scale: make the dar variable return the DAR.
Before, it just returned width/height. Correct is width/height*sar. That way it is consistent with DAR as in probe output and setdar. Signed-off-by: Rudolf Polzer <divverent@xonotic.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/version.h2
-rw-r--r--libavfilter/vf_scale.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 02f348ebb7..bc079b4046 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 11
-#define LIBAVFILTER_VERSION_MICRO 0
+#define LIBAVFILTER_VERSION_MICRO 1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
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;