diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index 97740f103d..2f1b8ce6b1 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -47,11 +47,11 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) return AVERROR(EINVAL); } - gcd = av_gcd(FFABS(aspect->aspect.num), FFABS(aspect->aspect.den)); - if (gcd) { - aspect->aspect.num /= gcd; - aspect->aspect.den /= gcd; - } + gcd = av_gcd(FFABS(aspect->aspect.num), FFABS(aspect->aspect.den)); + if (gcd) { + aspect->aspect.num /= gcd; + aspect->aspect.den /= gcd; + } } if (aspect->aspect.den == 0)