]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/apedec: use proper macro and type for pivot variable
authorPaul B Mahol <onemda@gmail.com>
Mon, 5 Oct 2020 23:56:43 +0000 (01:56 +0200)
committerPaul B Mahol <onemda@gmail.com>
Mon, 12 Oct 2020 10:20:26 +0000 (12:20 +0200)
libavcodec/apedec.c

index aa4d8fa5242d22be397efb25ddac32f5ee28af86..8fe7b5ee86feca4425f2dbebf95b55d9bb78878e 100644 (file)
@@ -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);