Skip to content
Snippets Groups Projects
Commit 25c32d08 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos Committed by Stefano Sabatini
Browse files

cmdutils: move "#undef main" from ffplay.c to cmdutils.h

On Windows/MinGW the SDL cflags re-define the main() function, which
results in a linking error if the define is not undeffed.

Since the addition of the SDL output device, SDL cflags are used also
for compiling ffmpeg and ffprobe, so we need to move this trick from
ffplay.c to a common header.

Fix trac issue #256.
parent c9614bb2
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
#include "libavformat/avformat.h" #include "libavformat/avformat.h"
#include "libswscale/swscale.h" #include "libswscale/swscale.h"
#ifdef __MINGW32__
#undef main /* We don't want SDL to override our main() */
#endif
/** /**
* program name, defined by the program for show_version(). * program name, defined by the program for show_version().
*/ */
......
...@@ -43,14 +43,10 @@ ...@@ -43,14 +43,10 @@
# include "libavfilter/avfiltergraph.h" # include "libavfilter/avfiltergraph.h"
#endif #endif
#include "cmdutils.h"
#include <SDL.h> #include <SDL.h>
#include <SDL_thread.h> #include <SDL_thread.h>
#ifdef __MINGW32__ #include "cmdutils.h"
#undef main /* We don't want SDL to override our main() */
#endif
#include <unistd.h> #include <unistd.h>
#include <assert.h> #include <assert.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment