diff mbox

[FFmpeg-devel,03/11] avformat/fitsdec: use FFABS to instead of abs

Message ID 20171115074358.25266-1-lq@chinaffmpeg.org
State New
Headers show

Commit Message

Liu Steven Nov. 15, 2017, 7:43 a.m. UTC
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/fitsdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavformat/fitsdec.c b/libavformat/fitsdec.c
index 4b288b3903..b190118345 100644
--- a/libavformat/fitsdec.c
+++ b/libavformat/fitsdec.c
@@ -124,7 +124,7 @@  static int64_t is_image(AVFormatContext *s, FITSContext *fits, FITSHeader *heade
         return AVERROR_INVALIDDATA;
     size += header->pcount;
 
-    t = (abs(header->bitpix) >> 3) * ((int64_t) header->gcount);
+    t = (FFABS(header->bitpix) >> 3) * ((int64_t) header->gcount);
     if(size && t > UINT64_MAX / size)
         return AVERROR_INVALIDDATA;
     size *= t;