30 Sep
2010
30 Sep
'10
10:01 p.m.
On Thu, Sep 30, 2010 at 11:57:31PM +0200, michael wrote:
+/** + * assert() equivalent, that is always enabled. + */ +#define av_assert0(cond) do {if(!(cond)) { av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n", AV_STRINGIFY(cond), __FILE__, __LINE__); abort(); }}while(0) + + +/** + * assert() equivalent, that does not lie in speed critical code. + * These asserts() thus can be enabled without fearing speedloss. + */ +#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0 +#define av_assert1(cond) av_assert_always(cond) +#else +#define av_assert1(cond) ((void)0) +#endif
Huh? Did you mean av_assert0 instead of av_assert_always?