summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2012-02-28 17:42:12 +0100
committerDiego Biurrun <diego@biurrun.de>2012-05-10 16:40:43 +0200
commit706b998cdcea97c50fad2228f67488de0e06b2a2 (patch)
treea23fbd417e667321b71ff5ef882458cf582e4d44 /libavcodec
parentcbc7d60afa0c56f8e50131830278fd32a89aed9d (diff)
downloadffmpeg-706b998cdcea97c50fad2228f67488de0e06b2a2.tar.gz
ape: Use unsigned integer maths
This involves a division that should be a shift. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/apedec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index e41f555e31..b07f3a090b 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -393,7 +393,7 @@ static inline int range_get_symbol(APEContext *ctx,
}
/** @} */ // group rangecoder
-static inline void update_rice(APERice *rice, int x)
+static inline void update_rice(APERice *rice, unsigned int x)
{
int lim = rice->k ? (1 << (rice->k + 4)) : 0;
rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
@@ -406,7 +406,7 @@ static inline void update_rice(APERice *rice, int x)
static inline int ape_decode_value(APEContext *ctx, APERice *rice)
{
- int x, overflow;
+ unsigned int x, overflow;
if (ctx->fileversion < 3990) {
int tmpk;