[FFmpeg-cvslog] avutil: check pixdescs in a different place

wm4 git at videolan.org
Tue Feb 10 15:57:48 CET 2015


ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Tue Feb 10 13:27:03 2015 +0100| [92e3a6fdac73f7e1d69d69717219a7538877d7a0] | committer: Michael Niedermayer

avutil: check pixdescs in a different place

Doing this check in avutil_version() is not appropriate. Also, this code
is by default disabled (--assert-level is by default 0). A FATE run with
defaults will never execute the checks.

Move it to the pixelutils test program. Whatever reason there was in
avutil_version() not to run this test by default, it should be fine in
this test program. This means FATE will run the test by default. (Yes,
pixelutils is not strictly the best place for it either, but it's
better.)

(pixdesc.c also has a small test program, but it's never run by FATE.)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92e3a6fdac73f7e1d69d69717219a7538877d7a0
---

 libavutil/pixelutils.c |    3 +++
 libavutil/utils.c      |    3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavutil/pixelutils.c b/libavutil/pixelutils.c
index 8f04024..1ec4fbb 100644
--- a/libavutil/pixelutils.c
+++ b/libavutil/pixelutils.c
@@ -19,6 +19,7 @@
 #include "config.h"
 #include "common.h"
 #include "pixelutils.h"
+#include "internal.h"
 
 #if CONFIG_PIXELUTILS
 
@@ -151,6 +152,8 @@ int main(void)
         goto end;
     }
 
+    ff_check_pixfmt_descriptors();
+
 #define RANDOM_INIT(buf, size) do {             \
     int k;                                      \
     for (k = 0; k < size; k++) {                \
diff --git a/libavutil/utils.c b/libavutil/utils.c
index 3682168..0b765ed 100644
--- a/libavutil/utils.c
+++ b/libavutil/utils.c
@@ -54,9 +54,6 @@ unsigned avutil_version(void)
         av_log(NULL, AV_LOG_ERROR, "Libavutil has been linked to a broken llrint()\n");
     }
 
-#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
-    ff_check_pixfmt_descriptors();
-#endif
     checks_done = 1;
     return LIBAVUTIL_VERSION_INT;
 }



More information about the ffmpeg-cvslog mailing list