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

Submitted by Steven Liu on Nov. 15, 2017, 7:43 a.m.

Details

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

Commit Message

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

Patch hide | download patch | download mbox

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;