Browse Source

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.
tags/n0.8
Carl Eugen Hoyos Stefano Sabatini 14 years ago
parent
commit
25c32d082b
2 changed files with 5 additions and 5 deletions
  1. +4
    -0
      cmdutils.h
  2. +1
    -5
      ffplay.c

+ 4
- 0
cmdutils.h View File

@@ -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().
*/


+ 1
- 5
ffplay.c View File

@@ -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>


Loading…
Cancel
Save