From dd77d9e91232c276229703ff1ca86c0ced771265 Mon Sep 17 00:00:00 2001
From: Stefano Pigozzi <stefano.pigozzi@gmail.com>
Date: Tue, 15 May 2012 09:31:38 +0200
Subject: [PATCH] cocoa: return the real CGLPixelFormatObj

vo_cocoa_cgl_pixel_format is returning a cached CGLPixelFormatObj.
Return the current one by querying the OpenGL context.
---
 libvo/cocoa_common.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvo/cocoa_common.m b/libvo/cocoa_common.m
index cef0b65ee8..9a822cc4ea 100644
--- a/libvo/cocoa_common.m
+++ b/libvo/cocoa_common.m
@@ -405,7 +405,7 @@ void *vo_cocoa_cgl_context(void)
 
 void *vo_cocoa_cgl_pixel_format(void)
 {
-    return [s->pixelFormat CGLPixelFormatObj];
+    return CGLGetPixelFormat(vo_cocoa_cgl_context());
 }
 
 int vo_cocoa_cgl_color_size(void)