[FFmpeg-devel] [PATCH v2 2/4] ffplay: make copy for SDL1

James Almer jamrial at gmail.com
Thu Sep 15 17:54:33 EEST 2016

On 9/15/2016 7:23 AM, Carl Eugen Hoyos wrote:
> 2016-09-15 12:19 GMT+02:00 Josh de Kock <josh at itanimul.li>:
>> On 15/09/2016 10:58, Carl Eugen Hoyos wrote:
>>> 2016-09-15 10:39 GMT+02:00 Josh de Kock <josh at itanimul.li>:
>>>>  #include "config.h"
>>>> +
>>>> +#if HAVE_SDL2
>>> Sorry if this should be obvious:
>>> What is the effect of this #if?
>> Don't worry, it's not really that obvious. If HAVE_SDL2 is false but
>> HAVE_SDL is true, then ffplay.c will get macro'd out, and ffplay_sdl1.c will
>> get added to the ffplay sources (see the Makefile change). If you can think
>> of a better way to do it, feel free to suggest.
> Thank you for explaining!
> Am I correct that with this patch only, sdl2 compilation of ffplay fails?

Technically speaking, with this patch only there's no ffplay SDL2
just yet. It's still SDL1, but you're right that compilation would
probably fail since it's SDL1 code in a configure setting where
SDL2 was selected (even if SDL1 headers were available and the
object sucessfully built, gcc would not link with SDL1 libraries).

I guess the sanest thing to do would be to squash patches two and

> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list