summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2011-10-16 22:31:53 -0700
committerLuca Barbato <lu_zero@gentoo.org>2011-10-17 22:27:12 -0700
commitec5e521298f2a7c8b42f4d247dbf09009d400355 (patch)
tree20f5878e81244de944e58630e09e551c7b7a4803
parent3ec344626c4ec2f515169f89bffe95dea92a5982 (diff)
downloadffmpeg-streaming-ec5e521298f2a7c8b42f4d247dbf09009d400355.zip
ffmpeg-streaming-ec5e521298f2a7c8b42f4d247dbf09009d400355.tar.gz
macosx: use the default surface on newer sdl
SDL 1.2.14 works fine with default colorspace on macosx and seems to have some issues with 24bit surfaces and resize in addition.
-rw-r--r--avplay.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/avplay.c b/avplay.c
index a4b58a5..225f81a 100644
--- a/avplay.c
+++ b/avplay.c
@@ -904,11 +904,11 @@ static int video_open(VideoState *is){
&& is->height== screen->h && screen->h == h)
return 0;
-#ifndef __APPLE__
- screen = SDL_SetVideoMode(w, h, 0, flags);
-#else
- /* setting bits_per_pixel = 0 or 32 causes blank video on OS X */
+#if defined(__APPLE__) && !SDL_VERSION_ATLEAST(1, 2, 14)
+ /* setting bits_per_pixel = 0 or 32 causes blank video on OS X and older SDL */
screen = SDL_SetVideoMode(w, h, 24, flags);
+#else
+ screen = SDL_SetVideoMode(w, h, 0, flags);
#endif
if (!screen) {
fprintf(stderr, "SDL: could not set video mode - exiting\n");
OpenPOWER on IntegriCloud