[MPlayer-cygwin] usage of -wid on windows
nick at savs.net
nick at savs.net
Thu Apr 28 03:31:18 CEST 2005
Hi,
I'm trying to get cygwin MPlayer to render video on another window (that of a win32 app that spawns mplayer), but I don't think I've got the usage of the -wid option correct.
intptr_t pid;
char *cmd_name="d:\\home\\nicholas\\src\\MPlayer-1.0pre7\\mplayer.exe";
char *args[5]; // null terminated array
char buf[100];
LONG wid = GetWindowLong(myWindow,GWL_ID);
sprintf(buf,"%ld",wid);
//sprintf(buf,"%x",wid);
//sprintf(buf,"0x%x",wid);
args[0]="mplayer.exe";
args[1]="-wid";
args[2]=buf;
args[3]="D:\\home\\nicholas\\mpeg\\VTS_02_1.mpg";
args[4]=NULL;
pid = spawnv(_P_WAIT,cmd_name,args);
It is using the directx vo. mplayer.exe dies with an applciation error saying "The instruction at "0xblahblah" referenced memory at "0x00000010". The memory could not be "read". Is it obvious what I'm doing wrong, or are there any preconditions or assumptions that aren't documented? Googling doesn't seem to help in that regard at all.
Thanks,
Nick
More information about the MPlayer-cygwin
mailing list