mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 21:20:41 +00:00
win32 compile fix for ffplay by gbazin at altern dot org
Originally committed as revision 1958 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
11e659c203
commit
31319a8ccd
1
configure
vendored
1
configure
vendored
@ -627,6 +627,7 @@ fi
|
||||
|
||||
cat > $TMPC << EOF
|
||||
#include <SDL.h>
|
||||
#undef main /* We don't want SDL to override our main() */
|
||||
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
|
||||
EOF
|
||||
|
||||
|
9
ffplay.c
9
ffplay.c
@ -25,6 +25,10 @@
|
||||
#include <SDL.h>
|
||||
#include <SDL_thread.h>
|
||||
|
||||
#ifdef CONFIG_WIN32
|
||||
#undef main /* We don't want SDL to override our main() */
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
#define HAVE_X11
|
||||
#endif
|
||||
@ -1359,7 +1363,10 @@ int main(int argc, char **argv)
|
||||
if (display_disable) {
|
||||
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)) {
|
||||
fprintf(stderr, "Could not initialize SDL - exiting\n");
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user