On Mon, 17 Oct 2011, Ronald S. Bultje wrote:

Hi,

On Sun, Oct 16, 2011 at 11:02 PM, Ronald S. Bultje <[email protected]> wrote:
HI,

On Sun, Oct 16, 2011 at 10:43 PM, Luca Barbato <[email protected]> wrote:
SDL 1.2.14 works fine with default colorspace on macosx and seems
to have some issues with 24bit surfaces and resize in addition.
---
 avplay.c |    8 ++++----
 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

Is there a runtime flag, so people don't have to recompile if they upgrade SDL?

Seems all runtime flags are part of SDL >= 1.3, so doesn't help here. Patch OK.

Since SDL 1.2.13, there seems to be a SDL_Linked_Version()... But if we'd require 1.2.13 on OS X in order to get that function, we could just as well require 1.2.14 straight away, too. So I guess it doesn't change the outcome of this patch really.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to