From b926b6282d3b9fc8115660ae013f74f4f8c06d30 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 30 Sep 2010 21:57:31 +0000 Subject: av_assert() system. With this the developer can now choose if he wants an assert always enabled or at which compile time assert level. This can thus replace the #define NDEBUG hacks Originally committed as revision 25278 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavutil/rational.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavutil/rational.c') diff --git a/libavutil/rational.c b/libavutil/rational.c index 3e8b885d49..4e3c50be81 100644 --- a/libavutil/rational.c +++ b/libavutil/rational.c @@ -25,7 +25,7 @@ * @author Michael Niedermayer */ -#include +#include "assert.h" //#include #include @@ -67,7 +67,7 @@ int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max) num= den; den= next_den; } - assert(av_gcd(a1.num, a1.den) <= 1U); + av_assert2(av_gcd(a1.num, a1.den) <= 1U); *dst_num = sign ? -a1.num : a1.num; *dst_den = a1.den; -- cgit v1.2.3