From d04d5bcd0ed647a0cc7b278e3a4560e7e783798d Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Thu, 19 Jul 2007 08:47:07 +0000 Subject: Fix the self tests which are contained in some codecs and are using random(). Originally committed as revision 9755 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ac3enc.c | 1 + libavcodec/cabac.c | 1 + libavcodec/h264.c | 1 + libavcodec/snow.c | 1 + 4 files changed, 4 insertions(+) (limited to 'libavcodec') diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 5aa415b6d6..84bb7b0290 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -1269,6 +1269,7 @@ static int AC3_encode_close(AVCodecContext *avctx) /*************************************************************************/ /* TEST */ +#undef random #define FN (N/4) void fft_test(void) diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index 2d51f6bcf0..7eb60b0ad2 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -179,6 +179,7 @@ void ff_init_cabac_states(CABACContext *c){ } #if 0 //selftest +#undef random #define SIZE 10240 #include "avcodec.h" diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 515058116f..c51496ae5b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -8101,6 +8101,7 @@ static inline void fill_mb_avail(H264Context *h){ #endif #if 0 //selftest +#undef random #define COUNT 8000 #define SIZE (COUNT*40) int main(){ diff --git a/libavcodec/snow.c b/libavcodec/snow.c index b62f49ac15..68d2566067 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -4552,6 +4552,7 @@ AVCodec snow_encoder = { #undef malloc #undef free #undef printf +#undef random int main(){ int width=256; -- cgit v1.2.3