Suggested-by: Rodger Combs <[email protected]>
Signed-off-by: Andreas Cadhalpun <[email protected]>
---
Changed the name as suggested by wm4 and the return value as suggested
by Muhammad Faiz.
There are also two new overflow checks at the end of the series.
---
libavutil/common.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavutil/common.h b/libavutil/common.h
index 8142b31fdb..6d795a353a 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -99,6 +99,8 @@
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
+#define FF_RETURN_ON_OVERFLOW(ctx, x) if (x) {av_log(ctx, AV_LOG_ERROR,
"Overflow check failed: " #x"\n"); return AVERROR(ERANGE);}
+
/* misc math functions */
#ifdef HAVE_AV_CONFIG_H
--
2.11.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel