summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmad/timer.c
authorllornkcor <llornkcor>2005-11-08 23:16:03 (UTC)
committer llornkcor <llornkcor>2005-11-08 23:16:03 (UTC)
commit6bd52d3658f01c966d690b12235592a5473a4d57 (patch) (side-by-side diff)
tree76e25003b738fde6ebbea5d338b7cf76b82f47fa /core/multimedia/opieplayer/libmad/timer.c
parenta8063e0797d6edf2ead22fc8c5346ddf187f0b5d (diff)
downloadopie-6bd52d3658f01c966d690b12235592a5473a4d57.zip
opie-6bd52d3658f01c966d690b12235592a5473a4d57.tar.gz
opie-6bd52d3658f01c966d690b12235592a5473a4d57.tar.bz2
update libmad and add 64bit define
Diffstat (limited to 'core/multimedia/opieplayer/libmad/timer.c') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/timer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/libmad/timer.c b/core/multimedia/opieplayer/libmad/timer.c
index 299fe0b..fa377d0 100644
--- a/core/multimedia/opieplayer/libmad/timer.c
+++ b/core/multimedia/opieplayer/libmad/timer.c
@@ -1,7 +1,7 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2001 Robert Leslie
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -77,9 +77,9 @@ void mad_timer_negate(mad_timer_t *timer)
* DESCRIPTION: return the absolute value of a timer
*/
mad_timer_t mad_timer_abs(mad_timer_t timer)
{
- if (mad_timer_sign(timer) < 0)
+ if (timer.seconds < 0)
mad_timer_negate(&timer);
return timer;
}
@@ -326,9 +326,10 @@ unsigned long mad_timer_fraction(mad_timer_t timer, unsigned long denom)
timer = mad_timer_abs(timer);
switch (denom) {
case 0:
- return MAD_TIMER_RESOLUTION / timer.fraction;
+ return timer.fraction ?
+ MAD_TIMER_RESOLUTION / timer.fraction : MAD_TIMER_RESOLUTION + 1;
case MAD_TIMER_RESOLUTION:
return timer.fraction;