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

Steven Liu lq at chinaffmpeg.org
Wed Nov 15 09:43:58 EET 2017


Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
 libavformat/fitsdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.11.0 (Apple Git-81)





More information about the ffmpeg-devel mailing list