[FFmpeg-devel] assertions disabled for most files

Mark Bertsch bertsch
Thu Sep 30 13:31:18 CEST 2010

Hello Everybody,

I tried several configurations, but assertions seem to be always 
disabled for most files. I checked out trunk, revision 25266, and 
release 0.6.

I tried ./configure --disable-asm --disable-optimizations and also with 
--enable-debug=0 till 3. Assertions are always disabled for most files. 
Is this known or intended? I did not find anything about it.

It seems that most files are affected, except the files directly in trunk.
So e.g. libavutil/utils.c is compiled with assertions disabled, but 
ffplay.c is compiled with assertions enabled.

The problem originates in libavutil/internal.h, line 29 and following:
#if !defined(DEBUG) && !defined(NDEBUG)
#    define NDEBUG
So it defaults to defining NDEBUG, if neither DEBUG nor NDEBUG is 
defined, which disables the assert macro.

Configuring with --extra-cflags=-DDEBUG enables assertions globally for 
me, however I think it should be implied by --disable-optimizations or 
another configure flag. Is there a more official way to archive this?

I'm on Scientific Linux 5, should be compatible to RHEL 5.0, but a 
little old.

Thank you,
Mark Bertsch

More information about the ffmpeg-devel mailing list