[FFmpeg-devel] [PATCH] FATE tests don't build when SDL is installed (Win7 with MinGW32).
michaelni at gmx.at
Thu Mar 6 22:11:28 CET 2014
On Tue, Mar 04, 2014 at 02:21:22PM -0500, gregory.wolfe at kodakalaris.com wrote:
> A while back I submitted a bug tracker ticket for this (#3368). Since I
> have already done the work, I figured I might as well share it.
> Patched files: 46 source files (see .patch file attached)
> Description (from commit message):
> Documented in ticket #3368, same problem as described in ticket #256.
> When SDL is being used, compile flags include -Dmain=SDL_main, which
> causes problems for FATE test programs. Applied same fix as in #256:
> if building using MinGW32, simply #undef main prior to main(argc,argv).
> diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
> index 6308348..a34bee2 100644
> --- a/libavcodec/dct-test.c
> +++ b/libavcodec/dct-test.c
> @@ -541,6 +541,10 @@ static void help(void)
> #include "compat/getopt.c"
> +#ifdef __MINGW32__
> +#undef main /* We don't want SDL to override our main() */
> int main(int argc, char **argv)
> int test_idct = 0, test_248_dct = 0;
adding this same "hack" to every file is kind of ugly
cant the "-Dmain=SDL_main" thing be filtered out of the flags or
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel