Commit d95784cc authored by bellard's avatar bellard

win32 compile fix for ffplay by gbazin at altern dot org


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1958 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7d0907e7
...@@ -627,6 +627,7 @@ fi ...@@ -627,6 +627,7 @@ fi
cat > $TMPC << EOF cat > $TMPC << EOF
#include <SDL.h> #include <SDL.h>
#undef main /* We don't want SDL to override our main() */
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
EOF EOF
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
#include <SDL.h> #include <SDL.h>
#include <SDL_thread.h> #include <SDL_thread.h>
#ifdef CONFIG_WIN32
#undef main /* We don't want SDL to override our main() */
#endif
#if defined(__linux__) #if defined(__linux__)
#define HAVE_X11 #define HAVE_X11
#endif #endif
...@@ -1359,7 +1363,10 @@ int main(int argc, char **argv) ...@@ -1359,7 +1363,10 @@ int main(int argc, char **argv)
if (display_disable) { if (display_disable) {
video_disable = 1; video_disable = 1;
} }
flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER | SDL_INIT_EVENTTHREAD; flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
#ifndef CONFIG_WIN32
flags |= SDL_INIT_EVENTTHREAD; /* Not supported on win32 */
#endif
if (SDL_Init (flags)) { if (SDL_Init (flags)) {
fprintf(stderr, "Could not initialize SDL - exiting\n"); fprintf(stderr, "Could not initialize SDL - exiting\n");
exit(1); exit(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment