[MPlayer-dev-eng] [PATCH] Mac OS X Finder support

Chris Roccati roccati at pobox.com
Mon Nov 8 00:20:10 CET 2004


On 7 Nov 2004, at 22:56, Nicolas Plourde wrote:
> Little problem here, If sdl is enable the build fail since sdl also 
> overide the main function.
> It give _UnixMain undefined symbol. Should i apply the patch anyway?

Yep, SDL #defines main to replace it with some of its custom code. 
SDL.h does an #undef main.
Only one can do such dirty trick in a C program.

Ok, I won't play dirty anymore; if I'm allowed to place a

#ifdef MACOSX_FINDER_SUPPORT
    macosx_get_finder_parameters(&argc,&argv);
#endif

right after the srand((int) time(NULL));

in mplayer.c at function main() I can rework the patch to not to need 
to #define main
it's somewhat quite ugly, because I will need to clobber argv, but 
under OSX argv only contains -psn_xxx_yyy anyway...




More information about the MPlayer-dev-eng mailing list