And have assert() enabled by default.
---

This one changes the default behaviour.

 configure            | 6 +++++-
 libavutil/internal.h | 4 ----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index edf89b8..1e0de22 100755
--- a/configure
+++ b/configure
@@ -313,6 +313,7 @@ Optimization options (experts only):
   --disable-yasm           disable use of nasm/yasm assembly

 Developer options (useful when working on Libav itself):
+  --disable-assert         compile the code with -DNDEBUG
   --disable-debug          disable debugging symbols
   --enable-debug=LEVEL     set the debug level [$debuglevel]
   --disable-optimizations  disable compiler optimizations
@@ -1732,6 +1733,7 @@ CMDLINE_SELECT="
     $HAVE_LIST_CMDLINE
     $THREADS_LIST
     asm
+    assert
     cross_compile
     debug
     extra_warnings
@@ -4744,7 +4746,9 @@ enabled vdpau && enabled xlib &&
     prepend avconv_libs $($ldflags_filter "-lvdpau") &&
     enable vdpau_x11

-enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
+enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel";
+
+disabled assert && add_cppflags -DNDEBUG

 # add some useful compiler flags if supported
 check_cflags -Wdeclaration-after-statement
diff --git a/libavutil/internal.h b/libavutil/internal.h
index b9be333..299fb0b 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -26,10 +26,6 @@
 #ifndef AVUTIL_INTERNAL_H
 #define AVUTIL_INTERNAL_H

-#if !defined(DEBUG) && !defined(NDEBUG)
-#    define NDEBUG
-#endif
-
 #include <limits.h>
 #include <stdint.h>
 #include <stddef.h>
--
2.6.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to