summaryrefslogtreecommitdiff
path: root/libavcodec/apedec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-10-06 01:56:43 +0200
committerPaul B Mahol <onemda@gmail.com>2020-10-12 12:20:26 +0200
commit2fb517855a5c6dc623b59d5a5e342cc668aa220d (patch)
tree84a5d3c6ae9379d49d4c96add4931e04e6ee93ff /libavcodec/apedec.c
parentea0972f6dd3ad51451b8acb9797364eddfecada5 (diff)
avcodec/apedec: use proper macro and type for pivot variable
Diffstat (limited to 'libavcodec/apedec.c')
-rw-r--r--libavcodec/apedec.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index aa4d8fa524..8fe7b5ee86 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -559,12 +559,10 @@ static inline int ape_decode_value_3900(APEContext *ctx, APERice *rice)
static inline int ape_decode_value_3990(APEContext *ctx, APERice *rice)
{
- unsigned int x, overflow;
- int base, pivot;
+ unsigned int x, overflow, pivot;
+ int base;
- pivot = rice->ksum >> 5;
- if (pivot == 0)
- pivot = 1;
+ pivot = FFMAX(rice->ksum >> 5, 1);
overflow = range_get_symbol(ctx, counts_3980, counts_diff_3980);