ugly ugly fix for michael's 1000l changes in swscaler: mysterious segfault w/g200

anyone have a better fix?


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10006 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rfelker 2003-04-27 18:44:23 +00:00
parent 1bbe2f9521
commit 987378835f
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,8 @@
#include "fastmemcpy.h"
#include "../mmx_defs.h"
#include "../cpudetect.h"
#include "../postproc/swscale.h"
#include "../postproc/rgb2rgb.h"
#include "mp_msg.h"
@ -413,9 +415,17 @@ static int mga_uninit(){
return 0;
}
static int get_sws_cpuflags(){
return
(gCpuCaps.hasMMX ? SWS_CPU_CAPS_MMX : 0)
| (gCpuCaps.hasMMX2 ? SWS_CPU_CAPS_MMX2 : 0)
| (gCpuCaps.has3DNow ? SWS_CPU_CAPS_3DNOW : 0);
}
static uint32_t preinit(const char *vo_subdevice)
{
const char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
sws_rgb2rgb_init(get_sws_cpuflags());
f = open(devname,O_RDWR);
if(f == -1)