From 7fcbe59d3f0cb5444d1a56f822f3e4ef77b8a17d Mon Sep 17 00:00:00 2001 From: ramiro Date: Wed, 18 Mar 2009 17:12:44 +0000 Subject: swscale-example: use LFG instead of random() git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28993 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale-example.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libswscale') diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c index 87b9ba027d..993d8db900 100644 --- a/libswscale/swscale-example.c +++ b/libswscale/swscale-example.c @@ -26,6 +26,7 @@ #undef HAVE_AV_CONFIG_H #include "libavutil/avutil.h" +#include "libavutil/lfg.h" #include "swscale.h" #include "swscale_internal.h" @@ -194,12 +195,15 @@ int main(int argc, char **argv){ int stride[3]={W, W, W}; int x, y; struct SwsContext *sws; + AVLFG rand; sws= sws_getContext(W/12, H/12, PIX_FMT_RGB32, W, H, PIX_FMT_YUV420P, 2, NULL, NULL, NULL); + av_lfg_init(&rand, 1); + for (y=0; y