avformat/mp3dec: use FFABS to instead of abs
authorSteven Liu <lq@chinaffmpeg.org>
Mon, 20 Nov 2017 02:49:42 +0000 (10:49 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 20 Nov 2017 02:49:42 +0000 (10:49 +0800)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
libavformat/mp3dec.c

index a5c4f2e..a76fe32 100644 (file)
@@ -508,9 +508,9 @@ static int64_t mp3_sync(AVFormatContext *s, int64_t target_pos, int flags)
                     return AVERROR(EINVAL);
                 }
             }
-            if ((target_pos - pos)*dir <= 0 && abs(MIN_VALID/2-j) < score) {
+            if ((target_pos - pos)*dir <= 0 && FFABS(MIN_VALID/2-j) < score) {
                 candidate = pos;
-                score = abs(MIN_VALID/2-j);
+                score = FFABS(MIN_VALID/2-j);
             }
             pos += ret;
         }