From 203d12891800e657cfe88589bf267b22e54edfa2 Mon Sep 17 00:00:00 2001 From: uau Date: Mon, 18 Sep 2006 14:04:50 +0000 Subject: Fix stupid use of multiplication to check signs which fails because of overflow. Negative values do not seem to be used so just remove the failing test. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19889 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libaf/af.c') diff --git a/libaf/af.c b/libaf/af.c index bae66ce8b0..ba5d59da14 100644 --- a/libaf/af.c +++ b/libaf/af.c @@ -650,11 +650,9 @@ af_instance_t *af_control_any_rev (af_stream_t* s, int cmd, void* arg) { * \brief calculate greatest common divisior of a and b. * \ingroup af_filter * - * Extended for negative and 0 values. If both are 0 the result is 1. - * The sign of the result will be so that it has the same sign as b. + * If both are 0 the result is 1. */ int af_gcd(register int a, register int b) { - int b_org = b; while (b != 0) { a %= b; if (a == 0) @@ -665,8 +663,6 @@ int af_gcd(register int a, register int b) { a += b; if (!a) return 1; - if (a * b_org < 0) - return -a; return a; } -- cgit v1.2.3