diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-06-03 13:30:27 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-03 17:03:43 +0200 |
commit | 25c32d082b1ab4c3567c09f707e75c8ac582806c (patch) | |
tree | e5dfc47aeefbf5239dca23e997f2e5813a3a78c6 | |
parent | c9614bb22c98c513c010e1e14b12349a8cc74d8c (diff) | |
download | ffmpeg-25c32d082b1ab4c3567c09f707e75c8ac582806c.tar.gz |
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.
-rw-r--r-- | cmdutils.h | 4 | ||||
-rw-r--r-- | ffplay.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cmdutils.h b/cmdutils.h index eea44018b6..eca98a3cf4 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -29,6 +29,10 @@ #include "libavformat/avformat.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(). */ @@ -43,14 +43,10 @@ # include "libavfilter/avfiltergraph.h" #endif -#include "cmdutils.h" - #include <SDL.h> #include <SDL_thread.h> -#ifdef __MINGW32__ -#undef main /* We don't want SDL to override our main() */ -#endif +#include "cmdutils.h" #include <unistd.h> #include <assert.h> |